💫 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 16:03:03 +00:00
|
|
|
STOP_WORDS = set(
|
|
|
|
"""
|
2017-03-28 12:10:20 +00:00
|
|
|
alle allerede alt and andre annen annet at av
|
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
bak bare bedre beste blant ble bli blir blitt bris by både
|
2017-03-28 12:10:20 +00:00
|
|
|
|
|
|
|
da dag de del dem den denne der dermed det dette disse drept du
|
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
eller en enn er et ett etter
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
fem fikk fire fjor flere folk for fortsatt fotball fra fram frankrike fredag
|
|
|
|
funnet få får fått før først første
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
gang gi gikk gjennom gjorde gjort gjør gjøre god godt grunn gå går
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
ha hadde ham han hans har hele helt henne hennes her hun hva hvor hvordan
|
|
|
|
hvorfor
|
2017-03-28 12:10:20 +00:00
|
|
|
|
|
|
|
i ifølge igjen ikke ingen inn
|
|
|
|
|
2017-03-23 10:10:22 +00:00
|
|
|
ja jeg
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
kamp kampen kan kl klart kom komme kommer kontakt kort kroner kunne kveld
|
|
|
|
kvinner
|
2017-03-28 12:10:20 +00:00
|
|
|
|
|
|
|
la laget land landet langt leder ligger like litt løpet lørdag
|
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
man mandag mange mannen mars med meg mellom men mener menn mennesker mens mer
|
|
|
|
millioner minutter mot msci mye må mål måtte
|
2017-03-28 12:10:20 +00:00
|
|
|
|
|
|
|
ned neste noe noen nok norge norsk norske ntb ny nye nå når
|
|
|
|
|
|
|
|
og også om onsdag opp opplyser oslo oss over
|
|
|
|
|
|
|
|
personer plass poeng politidistrikt politiet president prosent på
|
|
|
|
|
|
|
|
regjeringen runde rundt russland
|
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
sa saken samme sammen samtidig satt se seg seks selv senere september ser sett
|
|
|
|
siden sier sin sine siste sitt skal skriver skulle slik som sted stedet stor
|
|
|
|
store står sverige svært så søndag
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
ta tatt tid tidligere til tilbake tillegg tirsdag to tok torsdag tre tror
|
|
|
|
tyskland
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-05-08 13:51:22 +00:00
|
|
|
under usa ut uten utenfor
|
2017-03-28 12:10:20 +00: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 16:03:03 +00:00
|
|
|
""".split()
|
|
|
|
)
|