💫 Tidy up and auto-format .py files (#2983)
<!--- Provide a general summary of your changes in the title. -->
## Description
- [x] Use [`black`](https://github.com/ambv/black) to auto-format all `.py` files.
- [x] Update flake8 config to exclude very large files (lemmatization tables etc.)
- [x] Update code to be compatible with flake8 rules
- [x] Fix various small bugs, inconsistencies and messy stuff in the language data
- [x] Update docs to explain new code style (`black`, `flake8`, when to use `# fmt: off` and `# fmt: on` and what `# noqa` means)
Once #2932 is merged, which auto-formats and tidies up the CLI, we'll be able to run `flake8 spacy` actually get meaningful results.
At the moment, the code style and linting isn't applied automatically, but I'm hoping that the new [GitHub Actions](https://github.com/features/actions) will let us auto-format pull requests and post comments with relevant linting information.
### Types of change
enhancement, code style
## Checklist
<!--- Before you submit the PR, go over this checklist and make sure you can
tick off all the boxes. [] -> [x] -->
- [x] I have submitted the spaCy Contributor Agreement.
- [x] I ran the tests, and all new and existing tests passed.
- [x] My changes don't require a change to the documentation, or if they do, I've added all required information.
2018-11-30 19:03:03 +03:00
|
|
|
STOP_WORDS = set(
|
|
|
|
"""
|
2017-03-28 15:10:20 +03:00
|
|
|
alle allerede alt and andre annen annet at av
|
|
|
|
|
2017-05-08 16:51:22 +03:00
|
|
|
bak bare bedre beste blant ble bli blir blitt bris by både
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
da dag de del dem den denne der dermed det dette disse du
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2017-05-08 16:51:22 +03:00
|
|
|
eller en enn er et ett etter
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
fem fikk fire fjor flere folk for fortsatt fra fram
|
2017-05-08 16:51:22 +03:00
|
|
|
funnet få får fått før først første
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2017-05-08 16:51:22 +03:00
|
|
|
gang gi gikk gjennom gjorde gjort gjør gjøre god godt grunn gå går
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
ha hadde ham han hans har hele helt henne hennes her hun
|
2017-03-28 15:10:20 +03:00
|
|
|
|
|
|
|
i ifølge igjen ikke ingen inn
|
|
|
|
|
2017-03-23 13:10:22 +03:00
|
|
|
ja jeg
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2017-05-08 16:51:22 +03:00
|
|
|
kamp kampen kan kl klart kom komme kommer kontakt kort kroner kunne kveld
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
la laget land landet langt leder ligger like litt løpet
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
man mange med meg mellom men mener mennesker mens mer mot mye må mål måtte
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
ned neste noe noen nok ny nye nå når
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
og også om opp opplyser oss over
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
personer plass poeng på
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
runde rundt
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
sa saken samme sammen samtidig satt se seg seks selv senere ser sett
|
2017-05-08 16:51:22 +03:00
|
|
|
siden sier sin sine siste sitt skal skriver skulle slik som sted stedet stor
|
2021-12-07 11:45:10 +03:00
|
|
|
store står svært så
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
ta tatt tid tidligere til tilbake tillegg tok tror
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2021-12-07 11:45:10 +03:00
|
|
|
under ut uten utenfor
|
2017-03-28 15:10:20 +03:00
|
|
|
|
|
|
|
vant var ved veldig vi videre viktig vil ville viser vår være vært
|
|
|
|
|
|
|
|
å år
|
|
|
|
|
|
|
|
ønsker
|
💫 Tidy up and auto-format .py files (#2983)
<!--- Provide a general summary of your changes in the title. -->
## Description
- [x] Use [`black`](https://github.com/ambv/black) to auto-format all `.py` files.
- [x] Update flake8 config to exclude very large files (lemmatization tables etc.)
- [x] Update code to be compatible with flake8 rules
- [x] Fix various small bugs, inconsistencies and messy stuff in the language data
- [x] Update docs to explain new code style (`black`, `flake8`, when to use `# fmt: off` and `# fmt: on` and what `# noqa` means)
Once #2932 is merged, which auto-formats and tidies up the CLI, we'll be able to run `flake8 spacy` actually get meaningful results.
At the moment, the code style and linting isn't applied automatically, but I'm hoping that the new [GitHub Actions](https://github.com/features/actions) will let us auto-format pull requests and post comments with relevant linting information.
### Types of change
enhancement, code style
## Checklist
<!--- Before you submit the PR, go over this checklist and make sure you can
tick off all the boxes. [] -> [x] -->
- [x] I have submitted the spaCy Contributor Agreement.
- [x] I ran the tests, and all new and existing tests passed.
- [x] My changes don't require a change to the documentation, or if they do, I've added all required information.
2018-11-30 19:03:03 +03:00
|
|
|
""".split()
|
|
|
|
)
|