2017-05-10 22:15:12 +03:00
|
|
|
# encoding: utf8
|
2017-11-24 13:51:26 +03:00
|
|
|
"""
|
|
|
|
Tokenizer Exceptions.
|
|
|
|
Source: https://forkortelse.dk/ and various others.
|
|
|
|
"""
|
|
|
|
|
2017-05-10 22:15:12 +03:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2017-11-25 15:04:02 +03:00
|
|
|
from ...symbols import ORTH, LEMMA, NORM, TAG, PUNCT
|
2017-05-10 22:15:12 +03:00
|
|
|
|
|
|
|
|
|
|
|
_exc = {}
|
|
|
|
|
2017-11-24 16:43:29 +03:00
|
|
|
# Abbreviations for weekdays "søn." (for "søndag") as well as "Tor." and "Tors."
|
|
|
|
# (for "torsdag") are left out because they are ambiguous. The same is the case
|
|
|
|
# for abbreviations "jul." and "Jul." ("juli").
|
2017-07-03 16:44:17 +03:00
|
|
|
for exc_data in [
|
💫 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
|
|
|
{ORTH: "Kbh.", LEMMA: "København", NORM: "København"},
|
|
|
|
{ORTH: "jan.", LEMMA: "januar"},
|
|
|
|
{ORTH: "febr.", LEMMA: "februar"},
|
|
|
|
{ORTH: "feb.", LEMMA: "februar"},
|
|
|
|
{ORTH: "mar.", LEMMA: "marts"},
|
|
|
|
{ORTH: "apr.", LEMMA: "april"},
|
|
|
|
{ORTH: "jun.", LEMMA: "juni"},
|
|
|
|
{ORTH: "aug.", LEMMA: "august"},
|
|
|
|
{ORTH: "sept.", LEMMA: "september"},
|
|
|
|
{ORTH: "sep.", LEMMA: "september"},
|
|
|
|
{ORTH: "okt.", LEMMA: "oktober"},
|
|
|
|
{ORTH: "nov.", LEMMA: "november"},
|
|
|
|
{ORTH: "dec.", LEMMA: "december"},
|
|
|
|
{ORTH: "man.", LEMMA: "mandag"},
|
|
|
|
{ORTH: "tirs.", LEMMA: "tirsdag"},
|
|
|
|
{ORTH: "ons.", LEMMA: "onsdag"},
|
|
|
|
{ORTH: "tor.", LEMMA: "torsdag"},
|
|
|
|
{ORTH: "tors.", LEMMA: "torsdag"},
|
|
|
|
{ORTH: "fre.", LEMMA: "fredag"},
|
|
|
|
{ORTH: "lør.", LEMMA: "lørdag"},
|
|
|
|
{ORTH: "Jan.", LEMMA: "januar"},
|
|
|
|
{ORTH: "Febr.", LEMMA: "februar"},
|
|
|
|
{ORTH: "Feb.", LEMMA: "februar"},
|
|
|
|
{ORTH: "Mar.", LEMMA: "marts"},
|
|
|
|
{ORTH: "Apr.", LEMMA: "april"},
|
|
|
|
{ORTH: "Jun.", LEMMA: "juni"},
|
|
|
|
{ORTH: "Aug.", LEMMA: "august"},
|
|
|
|
{ORTH: "Sept.", LEMMA: "september"},
|
|
|
|
{ORTH: "Sep.", LEMMA: "september"},
|
|
|
|
{ORTH: "Okt.", LEMMA: "oktober"},
|
|
|
|
{ORTH: "Nov.", LEMMA: "november"},
|
|
|
|
{ORTH: "Dec.", LEMMA: "december"},
|
|
|
|
{ORTH: "Man.", LEMMA: "mandag"},
|
|
|
|
{ORTH: "Tirs.", LEMMA: "tirsdag"},
|
|
|
|
{ORTH: "Ons.", LEMMA: "onsdag"},
|
|
|
|
{ORTH: "Fre.", LEMMA: "fredag"},
|
|
|
|
{ORTH: "Lør.", LEMMA: "lørdag"},
|
2019-07-12 16:20:42 +03:00
|
|
|
{ORTH: "og/eller", LEMMA: "og/eller", NORM: "og/eller", TAG: "CC"},
|
💫 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
|
|
|
]:
|
2017-11-02 01:02:45 +03:00
|
|
|
_exc[exc_data[ORTH]] = [exc_data]
|
2017-05-10 22:15:12 +03:00
|
|
|
|
2017-12-20 19:36:52 +03:00
|
|
|
|
|
|
|
# Specified case only
|
|
|
|
for orth in [
|
💫 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
|
|
|
"diam.",
|
|
|
|
"ib.",
|
|
|
|
"mia.",
|
|
|
|
"mik.",
|
|
|
|
"pers.",
|
|
|
|
"A.D.",
|
2019-07-12 16:20:42 +03:00
|
|
|
"A/B",
|
|
|
|
"a/s",
|
💫 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
|
|
|
"A/S",
|
|
|
|
"B.C.",
|
|
|
|
"BK.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"B.T.",
|
💫 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
|
|
|
"Dr.",
|
|
|
|
"Boul.",
|
|
|
|
"Chr.",
|
|
|
|
"Dronn.",
|
|
|
|
"H.K.H.",
|
|
|
|
"H.M.",
|
|
|
|
"Hf.",
|
|
|
|
"i/s",
|
|
|
|
"I/S",
|
2020-02-26 16:59:03 +03:00
|
|
|
"Inc.",
|
💫 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
|
|
|
"Kprs.",
|
|
|
|
"L.A.",
|
|
|
|
"Ll.",
|
2019-07-12 16:20:42 +03:00
|
|
|
"m/k",
|
💫 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
|
|
|
"m/s",
|
2019-07-12 16:20:42 +03:00
|
|
|
"m/sek.",
|
💫 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
|
|
|
"M/S",
|
|
|
|
"Mag.",
|
|
|
|
"Mr.",
|
|
|
|
"Ndr.",
|
|
|
|
"Ph.d.",
|
|
|
|
"Prs.",
|
|
|
|
"Rcp.",
|
|
|
|
"Sdr.",
|
|
|
|
"Skt.",
|
|
|
|
"Spl.",
|
2019-07-12 16:20:42 +03:00
|
|
|
"TCP/IP",
|
💫 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
|
|
|
"Vg.",
|
|
|
|
]:
|
2017-12-20 19:36:52 +03:00
|
|
|
_exc[orth] = [{ORTH: orth}]
|
|
|
|
|
|
|
|
|
2017-05-10 22:15:12 +03:00
|
|
|
for orth in [
|
💫 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
|
|
|
"aarh.",
|
|
|
|
"ac.",
|
|
|
|
"adj.",
|
|
|
|
"adr.",
|
|
|
|
"adsk.",
|
|
|
|
"adv.",
|
|
|
|
"afb.",
|
|
|
|
"afd.",
|
|
|
|
"afg.",
|
|
|
|
"afk.",
|
|
|
|
"afs.",
|
|
|
|
"aht.",
|
|
|
|
"alg.",
|
|
|
|
"alk.",
|
|
|
|
"alm.",
|
|
|
|
"amer.",
|
|
|
|
"ang.",
|
|
|
|
"ank.",
|
|
|
|
"anl.",
|
|
|
|
"anv.",
|
|
|
|
"arb.",
|
|
|
|
"arr.",
|
|
|
|
"att.",
|
|
|
|
"bd.",
|
|
|
|
"bdt.",
|
|
|
|
"beg.",
|
|
|
|
"begr.",
|
|
|
|
"beh.",
|
|
|
|
"bet.",
|
|
|
|
"bev.",
|
|
|
|
"bhk.",
|
|
|
|
"bib.",
|
|
|
|
"bibl.",
|
|
|
|
"bidr.",
|
|
|
|
"bildl.",
|
|
|
|
"bill.",
|
|
|
|
"biol.",
|
|
|
|
"bk.",
|
|
|
|
"bl.",
|
|
|
|
"bl.a.",
|
|
|
|
"borgm.",
|
|
|
|
"br.",
|
|
|
|
"brolægn.",
|
|
|
|
"bto.",
|
|
|
|
"bygn.",
|
2019-07-12 16:20:42 +03:00
|
|
|
"c/o",
|
💫 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
|
|
|
"ca.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"cm.",
|
💫 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
|
|
|
"cand.",
|
|
|
|
"d.d.",
|
|
|
|
"d.m.",
|
|
|
|
"d.s.",
|
|
|
|
"d.s.s.",
|
|
|
|
"d.y.",
|
|
|
|
"d.å.",
|
|
|
|
"d.æ.",
|
|
|
|
"dagl.",
|
|
|
|
"dat.",
|
|
|
|
"dav.",
|
|
|
|
"def.",
|
|
|
|
"dek.",
|
|
|
|
"dep.",
|
|
|
|
"desl.",
|
|
|
|
"dir.",
|
|
|
|
"disp.",
|
|
|
|
"distr.",
|
|
|
|
"div.",
|
|
|
|
"dkr.",
|
|
|
|
"dl.",
|
|
|
|
"do.",
|
|
|
|
"dobb.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"dr.",
|
💫 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
|
|
|
"dr.h.c",
|
|
|
|
"dr.phil.",
|
|
|
|
"ds.",
|
|
|
|
"dvs.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"d.v.s.",
|
💫 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
|
|
|
"e.b.",
|
|
|
|
"e.l.",
|
|
|
|
"e.o.",
|
|
|
|
"e.v.t.",
|
|
|
|
"eftf.",
|
|
|
|
"eftm.",
|
|
|
|
"egl.",
|
|
|
|
"eks.",
|
|
|
|
"eksam.",
|
|
|
|
"ekskl.",
|
|
|
|
"eksp.",
|
|
|
|
"ekspl.",
|
|
|
|
"el.lign.",
|
|
|
|
"emer.",
|
|
|
|
"endv.",
|
|
|
|
"eng.",
|
|
|
|
"enk.",
|
|
|
|
"etc.",
|
|
|
|
"etym.",
|
|
|
|
"eur.",
|
|
|
|
"evt.",
|
|
|
|
"exam.",
|
|
|
|
"f.eks.",
|
|
|
|
"f.m.",
|
|
|
|
"f.n.",
|
|
|
|
"f.o.",
|
|
|
|
"f.o.m.",
|
|
|
|
"f.s.v.",
|
|
|
|
"f.t.",
|
|
|
|
"f.v.t.",
|
|
|
|
"f.å.",
|
|
|
|
"fa.",
|
|
|
|
"fakt.",
|
|
|
|
"fam.",
|
|
|
|
"ff.",
|
|
|
|
"fg.",
|
|
|
|
"fhv.",
|
|
|
|
"fig.",
|
|
|
|
"filol.",
|
|
|
|
"filos.",
|
|
|
|
"fl.",
|
|
|
|
"flg.",
|
|
|
|
"fm.",
|
|
|
|
"fmd.",
|
|
|
|
"fol.",
|
|
|
|
"forb.",
|
|
|
|
"foreg.",
|
|
|
|
"foren.",
|
|
|
|
"forf.",
|
|
|
|
"fork.",
|
|
|
|
"forr.",
|
|
|
|
"fors.",
|
|
|
|
"forsk.",
|
|
|
|
"forts.",
|
|
|
|
"fr.",
|
|
|
|
"fr.u.",
|
|
|
|
"frk.",
|
|
|
|
"fsva.",
|
|
|
|
"fuldm.",
|
|
|
|
"fung.",
|
|
|
|
"fx.",
|
|
|
|
"fys.",
|
|
|
|
"fær.",
|
|
|
|
"g.d.",
|
|
|
|
"g.m.",
|
|
|
|
"gd.",
|
|
|
|
"gdr.",
|
|
|
|
"genuds.",
|
|
|
|
"gl.",
|
|
|
|
"gn.",
|
|
|
|
"gns.",
|
|
|
|
"gr.",
|
|
|
|
"grdl.",
|
|
|
|
"gross.",
|
|
|
|
"h.a.",
|
|
|
|
"h.c.",
|
|
|
|
"hdl.",
|
|
|
|
"henv.",
|
|
|
|
"hhv.",
|
|
|
|
"hj.hj.",
|
|
|
|
"hj.spl.",
|
|
|
|
"hort.",
|
|
|
|
"hosp.",
|
|
|
|
"hpl.",
|
|
|
|
"hr.",
|
|
|
|
"hrs.",
|
|
|
|
"hum.",
|
|
|
|
"hvp.",
|
|
|
|
"i.e.",
|
|
|
|
"id.",
|
|
|
|
"if.",
|
|
|
|
"iflg.",
|
|
|
|
"ifm.",
|
|
|
|
"ift.",
|
|
|
|
"iht.",
|
|
|
|
"ill.",
|
|
|
|
"indb.",
|
|
|
|
"indreg.",
|
|
|
|
"inf.",
|
|
|
|
"ing.",
|
|
|
|
"inh.",
|
|
|
|
"inj.",
|
|
|
|
"inkl.",
|
|
|
|
"insp.",
|
|
|
|
"instr.",
|
|
|
|
"isl.",
|
|
|
|
"istf.",
|
|
|
|
"it.",
|
|
|
|
"ital.",
|
|
|
|
"iv.",
|
|
|
|
"jap.",
|
|
|
|
"jf.",
|
|
|
|
"jfr.",
|
|
|
|
"jnr.",
|
|
|
|
"j.nr.",
|
|
|
|
"jr.",
|
|
|
|
"jur.",
|
|
|
|
"jvf.",
|
|
|
|
"kap.",
|
|
|
|
"kbh.",
|
|
|
|
"kem.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"kg.",
|
|
|
|
"kgs.",
|
💫 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
|
|
|
"kgl.",
|
|
|
|
"kl.",
|
|
|
|
"kld.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"km.",
|
2019-07-12 16:20:42 +03:00
|
|
|
"km/t",
|
2020-02-26 16:59:03 +03:00
|
|
|
"km/t.",
|
💫 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
|
|
|
"knsp.",
|
|
|
|
"komm.",
|
|
|
|
"kons.",
|
|
|
|
"korr.",
|
|
|
|
"kp.",
|
|
|
|
"kr.",
|
|
|
|
"kst.",
|
|
|
|
"kt.",
|
|
|
|
"ktr.",
|
|
|
|
"kv.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"kvm.",
|
💫 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
|
|
|
"kvt.",
|
|
|
|
"l.c.",
|
|
|
|
"lab.",
|
|
|
|
"lat.",
|
|
|
|
"lb.m.",
|
|
|
|
"lb.nr.",
|
|
|
|
"lejl.",
|
|
|
|
"lgd.",
|
|
|
|
"lic.",
|
|
|
|
"lign.",
|
|
|
|
"lin.",
|
|
|
|
"ling.merc.",
|
|
|
|
"litt.",
|
|
|
|
"loc.cit.",
|
|
|
|
"lok.",
|
|
|
|
"lrs.",
|
|
|
|
"ltr.",
|
|
|
|
"m.a.o.",
|
|
|
|
"m.fl.",
|
|
|
|
"m.m.",
|
|
|
|
"m.v.",
|
|
|
|
"m.v.h.",
|
|
|
|
"maks.",
|
|
|
|
"md.",
|
|
|
|
"mdr.",
|
|
|
|
"mdtl.",
|
|
|
|
"mezz.",
|
|
|
|
"mfl.",
|
|
|
|
"m.h.p.",
|
|
|
|
"m.h.t.",
|
|
|
|
"mht.",
|
|
|
|
"mill.",
|
|
|
|
"mio.",
|
|
|
|
"modt.",
|
|
|
|
"mrk.",
|
|
|
|
"mul.",
|
|
|
|
"mv.",
|
|
|
|
"n.br.",
|
|
|
|
"n.f.",
|
|
|
|
"nb.",
|
|
|
|
"nedenst.",
|
|
|
|
"nl.",
|
|
|
|
"nr.",
|
|
|
|
"nto.",
|
|
|
|
"nuv.",
|
|
|
|
"o/m",
|
2020-02-26 16:59:03 +03:00
|
|
|
"o/m.",
|
💫 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
|
|
|
"o.a.",
|
|
|
|
"o.fl.",
|
|
|
|
"o.h.",
|
|
|
|
"o.l.",
|
|
|
|
"o.lign.",
|
|
|
|
"o.m.a.",
|
|
|
|
"o.s.fr.",
|
|
|
|
"obl.",
|
|
|
|
"obs.",
|
|
|
|
"odont.",
|
|
|
|
"oecon.",
|
|
|
|
"off.",
|
|
|
|
"ofl.",
|
|
|
|
"omg.",
|
|
|
|
"omkr.",
|
|
|
|
"omr.",
|
|
|
|
"omtr.",
|
|
|
|
"opg.",
|
|
|
|
"opl.",
|
|
|
|
"opr.",
|
|
|
|
"org.",
|
|
|
|
"orig.",
|
|
|
|
"osv.",
|
|
|
|
"ovenst.",
|
|
|
|
"overs.",
|
|
|
|
"ovf.",
|
|
|
|
"p.a.",
|
|
|
|
"p.b.a",
|
|
|
|
"p.b.v",
|
|
|
|
"p.c.",
|
|
|
|
"p.m.",
|
|
|
|
"p.m.v.",
|
|
|
|
"p.n.",
|
|
|
|
"p.p.",
|
|
|
|
"p.p.s.",
|
|
|
|
"p.s.",
|
|
|
|
"p.t.",
|
|
|
|
"p.v.a.",
|
|
|
|
"p.v.c.",
|
|
|
|
"pag.",
|
|
|
|
"pass.",
|
|
|
|
"pcs.",
|
|
|
|
"pct.",
|
|
|
|
"pd.",
|
|
|
|
"pens.",
|
|
|
|
"pft.",
|
|
|
|
"pg.",
|
|
|
|
"pga.",
|
|
|
|
"pgl.",
|
|
|
|
"pinx.",
|
|
|
|
"pk.",
|
|
|
|
"pkt.",
|
|
|
|
"polit.",
|
|
|
|
"polyt.",
|
|
|
|
"pos.",
|
|
|
|
"pp.",
|
|
|
|
"ppm.",
|
|
|
|
"pr.",
|
|
|
|
"prc.",
|
|
|
|
"priv.",
|
|
|
|
"prod.",
|
|
|
|
"prof.",
|
|
|
|
"pron.",
|
|
|
|
"præd.",
|
|
|
|
"præf.",
|
|
|
|
"præt.",
|
|
|
|
"psych.",
|
|
|
|
"pt.",
|
|
|
|
"pæd.",
|
|
|
|
"q.e.d.",
|
|
|
|
"rad.",
|
|
|
|
"red.",
|
|
|
|
"ref.",
|
|
|
|
"reg.",
|
|
|
|
"regn.",
|
|
|
|
"rel.",
|
|
|
|
"rep.",
|
|
|
|
"repr.",
|
|
|
|
"resp.",
|
|
|
|
"rest.",
|
|
|
|
"rm.",
|
|
|
|
"rtg.",
|
|
|
|
"russ.",
|
|
|
|
"s.br.",
|
|
|
|
"s.d.",
|
|
|
|
"s.f.",
|
|
|
|
"s.m.b.a.",
|
|
|
|
"s.u.",
|
|
|
|
"s.å.",
|
|
|
|
"sa.",
|
|
|
|
"sb.",
|
|
|
|
"sc.",
|
|
|
|
"scient.",
|
|
|
|
"scil.",
|
|
|
|
"sek.",
|
|
|
|
"sekr.",
|
|
|
|
"self.",
|
|
|
|
"sem.",
|
|
|
|
"shj.",
|
|
|
|
"sign.",
|
|
|
|
"sing.",
|
|
|
|
"sj.",
|
|
|
|
"skr.",
|
|
|
|
"slutn.",
|
|
|
|
"sml.",
|
|
|
|
"smp.",
|
|
|
|
"snr.",
|
|
|
|
"soc.",
|
|
|
|
"soc.dem.",
|
|
|
|
"sp.",
|
|
|
|
"spec.",
|
|
|
|
"spm.",
|
|
|
|
"spr.",
|
|
|
|
"spsk.",
|
|
|
|
"statsaut.",
|
|
|
|
"st.",
|
|
|
|
"stk.",
|
|
|
|
"str.",
|
|
|
|
"stud.",
|
|
|
|
"subj.",
|
|
|
|
"subst.",
|
|
|
|
"suff.",
|
|
|
|
"sup.",
|
|
|
|
"suppl.",
|
|
|
|
"sv.",
|
|
|
|
"såk.",
|
|
|
|
"sædv.",
|
|
|
|
"t/r",
|
|
|
|
"t.h.",
|
|
|
|
"t.o.",
|
|
|
|
"t.o.m.",
|
|
|
|
"t.v.",
|
|
|
|
"tbl.",
|
|
|
|
"tcp/ip",
|
|
|
|
"td.",
|
|
|
|
"tdl.",
|
|
|
|
"tdr.",
|
|
|
|
"techn.",
|
|
|
|
"tekn.",
|
|
|
|
"temp.",
|
|
|
|
"th.",
|
|
|
|
"theol.",
|
|
|
|
"tidl.",
|
|
|
|
"tilf.",
|
|
|
|
"tilh.",
|
|
|
|
"till.",
|
|
|
|
"tilsv.",
|
|
|
|
"tjg.",
|
|
|
|
"tkr.",
|
|
|
|
"tlf.",
|
|
|
|
"tlgr.",
|
|
|
|
"tr.",
|
|
|
|
"trp.",
|
|
|
|
"tsk.",
|
|
|
|
"tv.",
|
|
|
|
"ty.",
|
|
|
|
"u/b",
|
|
|
|
"udb.",
|
|
|
|
"udbet.",
|
|
|
|
"ugtl.",
|
|
|
|
"undt.",
|
|
|
|
"v.f.",
|
|
|
|
"vb.",
|
|
|
|
"vedk.",
|
|
|
|
"vedl.",
|
|
|
|
"vedr.",
|
|
|
|
"vejl.",
|
|
|
|
"vh.",
|
|
|
|
"vha.",
|
2020-02-26 16:59:03 +03:00
|
|
|
"vind.",
|
💫 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
|
|
|
"vs.",
|
|
|
|
"vsa.",
|
|
|
|
"vær.",
|
|
|
|
"zool.",
|
|
|
|
"ø.lgd.",
|
|
|
|
"øvr.",
|
|
|
|
"årg.",
|
|
|
|
"årh.",
|
|
|
|
]:
|
2017-05-10 22:15:12 +03:00
|
|
|
_exc[orth] = [{ORTH: orth}]
|
2017-12-20 19:36:52 +03:00
|
|
|
capitalized = orth.capitalize()
|
|
|
|
_exc[capitalized] = [{ORTH: capitalized}]
|
|
|
|
|
|
|
|
for exc_data in [
|
💫 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
|
|
|
{ORTH: "s'gu", LEMMA: "s'gu", NORM: "s'gu"},
|
|
|
|
{ORTH: "S'gu", LEMMA: "s'gu", NORM: "s'gu"},
|
|
|
|
{ORTH: "sgu'", LEMMA: "s'gu", NORM: "s'gu"},
|
|
|
|
{ORTH: "Sgu'", LEMMA: "s'gu", NORM: "s'gu"},
|
|
|
|
{ORTH: "sku'", LEMMA: "skal", NORM: "skulle"},
|
|
|
|
{ORTH: "ku'", LEMMA: "kan", NORM: "kunne"},
|
|
|
|
{ORTH: "Ku'", LEMMA: "kan", NORM: "kunne"},
|
|
|
|
{ORTH: "ka'", LEMMA: "kan", NORM: "kan"},
|
|
|
|
{ORTH: "Ka'", LEMMA: "kan", NORM: "kan"},
|
|
|
|
{ORTH: "gi'", LEMMA: "give", NORM: "giv"},
|
|
|
|
{ORTH: "Gi'", LEMMA: "give", NORM: "giv"},
|
|
|
|
{ORTH: "li'", LEMMA: "lide", NORM: "lide"},
|
|
|
|
{ORTH: "ha'", LEMMA: "have", NORM: "have"},
|
|
|
|
{ORTH: "Ha'", LEMMA: "have", NORM: "have"},
|
|
|
|
{ORTH: "ik'", LEMMA: "ikke", NORM: "ikke"},
|
|
|
|
{ORTH: "Ik'", LEMMA: "ikke", NORM: "ikke"},
|
|
|
|
]:
|
2017-12-20 19:36:52 +03:00
|
|
|
_exc[exc_data[ORTH]] = [exc_data]
|
|
|
|
|
2017-05-10 22:15:12 +03:00
|
|
|
|
2017-11-24 17:03:24 +03:00
|
|
|
# Dates
|
|
|
|
for h in range(1, 31 + 1):
|
|
|
|
for period in ["."]:
|
2017-12-20 19:36:52 +03:00
|
|
|
_exc["%d%s" % (h, period)] = [{ORTH: "%d." % h}]
|
2017-11-24 17:03:24 +03:00
|
|
|
|
💫 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
|
|
|
_custom_base_exc = {"i.": [{ORTH: "i", LEMMA: "i", NORM: "i"}, {ORTH: ".", TAG: PUNCT}]}
|
2017-11-24 13:16:53 +03:00
|
|
|
_exc.update(_custom_base_exc)
|
|
|
|
|
2017-10-31 23:05:29 +03:00
|
|
|
TOKENIZER_EXCEPTIONS = _exc
|