2020-07-22 23:18:46 +03:00
|
|
|
from ..tokenizer_exceptions import BASE_EXCEPTIONS
|
2020-07-23 00:09:01 +03:00
|
|
|
from ...symbols import ORTH, NORM
|
2020-07-22 23:18:46 +03:00
|
|
|
from ...util import update_exc
|
2016-09-25 15:49:00 +03:00
|
|
|
|
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc = {}
|
💫 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
|
|
|
_exclude = [
|
|
|
|
"Ill",
|
|
|
|
"ill",
|
|
|
|
"Its",
|
|
|
|
"its",
|
|
|
|
"Hell",
|
|
|
|
"hell",
|
|
|
|
"Shell",
|
|
|
|
"shell",
|
|
|
|
"Shed",
|
|
|
|
"shed",
|
|
|
|
"were",
|
|
|
|
"Were",
|
|
|
|
"Well",
|
|
|
|
"well",
|
|
|
|
"Whore",
|
|
|
|
"whore",
|
|
|
|
]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Pronouns
|
|
|
|
for pron in ["i"]:
|
|
|
|
for orth in [pron, pron.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'m"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'m", NORM: "am"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "m"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "m", "tenspect": 1, "number": 1},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ma"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'m", NORM: "am"},
|
|
|
|
{ORTH: "a", NORM: "gonna"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "ma"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "m", NORM: "am"},
|
|
|
|
{ORTH: "a", NORM: "gonna"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
for pron in ["i", "you", "he", "she", "it", "we", "they"]:
|
|
|
|
for orth in [pron, pron.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ll"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'ll", NORM: "will"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "ll"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "ll", NORM: "will"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ll've"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'ll", NORM: "will"},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "llve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "ll", NORM: "will"},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'d"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
2020-05-08 16:10:57 +03:00
|
|
|
{ORTH: "'d", NORM: "'d"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "d"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
2020-05-08 16:10:57 +03:00
|
|
|
{ORTH: "d", NORM: "'d"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'d've"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'d", NORM: "would"},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "dve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "d", NORM: "would"},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
2017-01-05 21:57:00 +03:00
|
|
|
for pron in ["i", "you", "we", "they"]:
|
|
|
|
for orth in [pron, pron.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-05 21:57:00 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "ve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-05 21:57:00 +03:00
|
|
|
|
|
|
|
|
2017-01-03 20:26:09 +03:00
|
|
|
for pron in ["you", "we", "they"]:
|
|
|
|
for orth in [pron, pron.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'re"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "'re", NORM: "are"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "re"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
|
|
|
{ORTH: "re", NORM: "are"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
2017-01-05 21:57:00 +03:00
|
|
|
for pron in ["he", "she", "it"]:
|
|
|
|
for orth in [pron, pron.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'s"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
💫 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", NORM: "'s"},
|
|
|
|
]
|
2017-01-05 21:57:00 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "s"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: pron},
|
💫 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"},
|
|
|
|
]
|
2017-01-05 21:57:00 +03:00
|
|
|
|
|
|
|
|
2017-01-03 20:26:09 +03:00
|
|
|
# W-words, relative pronouns, prepositions etc.
|
|
|
|
|
2020-06-21 23:38:04 +03:00
|
|
|
for word in [
|
|
|
|
"who",
|
|
|
|
"what",
|
|
|
|
"when",
|
|
|
|
"where",
|
|
|
|
"why",
|
|
|
|
"how",
|
|
|
|
"there",
|
|
|
|
"that",
|
|
|
|
"this",
|
|
|
|
"these",
|
|
|
|
"those",
|
|
|
|
]:
|
2017-01-03 20:26:09 +03:00
|
|
|
for orth in [word, word.title()]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'s"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
💫 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", NORM: "'s"},
|
|
|
|
]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
2020-07-23 00:09:01 +03:00
|
|
|
_exc[orth + "s"] = [{ORTH: orth, NORM: word}, {ORTH: "s"}]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ll"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "'ll", NORM: "will"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "ll"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "ll", NORM: "will"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ll've"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "'ll", NORM: "will"},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "llve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "ll", NORM: "will"},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'re"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "'re", NORM: "are"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "re"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "re", NORM: "are"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'ve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "'ve"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "ve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'d"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
💫 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: "'d", NORM: "'d"},
|
|
|
|
]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
2020-05-08 16:10:57 +03:00
|
|
|
_exc[orth + "d"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
2020-05-21 15:14:01 +03:00
|
|
|
{ORTH: "d", NORM: "'d"},
|
2020-05-08 16:10:57 +03:00
|
|
|
]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "'d've"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "'d", NORM: "would"},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth + "dve"] = [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: orth, NORM: word},
|
|
|
|
{ORTH: "d", NORM: "would"},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Verbs
|
|
|
|
|
|
|
|
for verb_data in [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "ca", NORM: "can"},
|
|
|
|
{ORTH: "could", NORM: "could"},
|
|
|
|
{ORTH: "do", NORM: "do"},
|
|
|
|
{ORTH: "does", NORM: "does"},
|
|
|
|
{ORTH: "did", NORM: "do"},
|
|
|
|
{ORTH: "had", NORM: "have"},
|
|
|
|
{ORTH: "may", NORM: "may"},
|
|
|
|
{ORTH: "might", NORM: "might"},
|
|
|
|
{ORTH: "must", NORM: "must"},
|
2017-06-03 21:27:16 +03:00
|
|
|
{ORTH: "need", NORM: "need"},
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "ought", NORM: "ought"},
|
|
|
|
{ORTH: "sha", NORM: "shall"},
|
|
|
|
{ORTH: "should", NORM: "should"},
|
|
|
|
{ORTH: "wo", NORM: "will"},
|
|
|
|
{ORTH: "would", NORM: "would"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
verb_data_tc = dict(verb_data)
|
|
|
|
verb_data_tc[ORTH] = verb_data_tc[ORTH].title()
|
|
|
|
for data in [verb_data, verb_data_tc]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "n't"] = [
|
2017-01-03 20:26:09 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "n't", NORM: "not"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "nt"] = [
|
2017-01-03 20:26:09 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "nt", NORM: "not"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "n't've"] = [
|
2017-01-12 13:21:01 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "n't", NORM: "not"},
|
|
|
|
{ORTH: "'ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "ntve"] = [
|
2017-01-12 13:21:01 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "nt", NORM: "not"},
|
|
|
|
{ORTH: "ve", NORM: "have"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
for verb_data in [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "could", NORM: "could"},
|
|
|
|
{ORTH: "might", NORM: "might"},
|
|
|
|
{ORTH: "must", NORM: "must"},
|
|
|
|
{ORTH: "should", NORM: "should"},
|
|
|
|
{ORTH: "would", NORM: "would"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
verb_data_tc = dict(verb_data)
|
|
|
|
verb_data_tc[ORTH] = verb_data_tc[ORTH].title()
|
|
|
|
for data in [verb_data, verb_data_tc]:
|
2020-07-23 00:09:01 +03:00
|
|
|
_exc[data[ORTH] + "'ve"] = [dict(data), {ORTH: "'ve"}]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
2020-07-23 00:09:01 +03:00
|
|
|
_exc[data[ORTH] + "ve"] = [dict(data), {ORTH: "ve"}]
|
2017-01-03 20:26:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
for verb_data in [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "ai", "number": 2},
|
|
|
|
{ORTH: "are", NORM: "are", "number": 2},
|
|
|
|
{ORTH: "is", NORM: "is"},
|
|
|
|
{ORTH: "was", NORM: "was"},
|
|
|
|
{ORTH: "were", NORM: "were"},
|
2017-08-22 00:19:18 +03:00
|
|
|
{ORTH: "have", NORM: "have"},
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "has", NORM: "has"},
|
💫 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: "dare", NORM: "dare"},
|
|
|
|
]:
|
2017-01-03 20:26:09 +03:00
|
|
|
verb_data_tc = dict(verb_data)
|
|
|
|
verb_data_tc[ORTH] = verb_data_tc[ORTH].title()
|
|
|
|
for data in [verb_data, verb_data_tc]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "n't"] = [
|
2017-01-03 20:26:09 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "n't", NORM: "not"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH] + "nt"] = [
|
2017-01-03 20:26:09 +03:00
|
|
|
dict(data),
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "nt", NORM: "not"},
|
💫 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-01-03 20:26:09 +03:00
|
|
|
|
2017-01-05 21:59:06 +03:00
|
|
|
|
|
|
|
# Other contractions with trailing apostrophe
|
|
|
|
|
|
|
|
for exc_data in [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "doin", NORM: "doing"},
|
|
|
|
{ORTH: "goin", NORM: "going"},
|
|
|
|
{ORTH: "nothin", NORM: "nothing"},
|
|
|
|
{ORTH: "nuthin", NORM: "nothing"},
|
|
|
|
{ORTH: "ol", NORM: "old"},
|
|
|
|
{ORTH: "somethin", NORM: "something"},
|
💫 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-01-05 21:59:06 +03:00
|
|
|
exc_data_tc = dict(exc_data)
|
|
|
|
exc_data_tc[ORTH] = exc_data_tc[ORTH].title()
|
|
|
|
for data in [exc_data, exc_data_tc]:
|
|
|
|
data_apos = dict(data)
|
|
|
|
data_apos[ORTH] = data_apos[ORTH] + "'"
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[data[ORTH]] = [dict(data)]
|
|
|
|
_exc[data_apos[ORTH]] = [dict(data_apos)]
|
2017-01-05 21:59:06 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Other contractions with leading apostrophe
|
|
|
|
|
|
|
|
for exc_data in [
|
2018-12-14 14:51:18 +03:00
|
|
|
{ORTH: "cause", NORM: "because"},
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "em", NORM: "them"},
|
|
|
|
{ORTH: "ll", NORM: "will"},
|
|
|
|
{ORTH: "nuff", NORM: "enough"},
|
💫 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-01-05 21:59:06 +03:00
|
|
|
exc_data_apos = dict(exc_data)
|
|
|
|
exc_data_apos[ORTH] = "'" + exc_data_apos[ORTH]
|
|
|
|
for data in [exc_data, exc_data_apos]:
|
2017-11-02 01:02:45 +03:00
|
|
|
_exc[data[ORTH]] = [data]
|
2017-01-05 21:59:06 +03:00
|
|
|
|
|
|
|
|
2017-03-12 15:44:10 +03:00
|
|
|
# Times
|
|
|
|
|
|
|
|
for h in range(1, 12 + 1):
|
|
|
|
for period in ["a.m.", "am"]:
|
2019-12-25 19:59:52 +03:00
|
|
|
_exc[f"{h}{period}"] = [
|
|
|
|
{ORTH: f"{h}"},
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: period, NORM: "a.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
|
|
|
]
|
2017-03-12 15:44:10 +03:00
|
|
|
for period in ["p.m.", "pm"]:
|
2019-12-25 19:59:52 +03:00
|
|
|
_exc[f"{h}{period}"] = [
|
|
|
|
{ORTH: f"{h}"},
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: period, NORM: "p.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
|
|
|
]
|
2017-03-12 15:44:10 +03:00
|
|
|
|
|
|
|
|
2017-01-05 21:59:06 +03:00
|
|
|
# Rest
|
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_other_exc = {
|
2020-07-23 00:09:01 +03:00
|
|
|
"y'all": [{ORTH: "y'", NORM: "you"}, {ORTH: "all"}],
|
|
|
|
"yall": [{ORTH: "y", NORM: "you"}, {ORTH: "all"}],
|
|
|
|
"how'd'y": [{ORTH: "how"}, {ORTH: "'d"}, {ORTH: "'y", NORM: "you"}],
|
|
|
|
"How'd'y": [{ORTH: "How", NORM: "how"}, {ORTH: "'d"}, {ORTH: "'y", NORM: "you"}],
|
|
|
|
"not've": [{ORTH: "not"}, {ORTH: "'ve", NORM: "have"}],
|
|
|
|
"notve": [{ORTH: "not"}, {ORTH: "ve", NORM: "have"}],
|
|
|
|
"Not've": [{ORTH: "Not", NORM: "not"}, {ORTH: "'ve", NORM: "have"}],
|
|
|
|
"Notve": [{ORTH: "Not", NORM: "not"}, {ORTH: "ve", NORM: "have"}],
|
|
|
|
"cannot": [{ORTH: "can"}, {ORTH: "not"}],
|
|
|
|
"Cannot": [{ORTH: "Can", NORM: "can"}, {ORTH: "not"}],
|
|
|
|
"gonna": [{ORTH: "gon", NORM: "going"}, {ORTH: "na", NORM: "to"}],
|
|
|
|
"Gonna": [{ORTH: "Gon", NORM: "going"}, {ORTH: "na", NORM: "to"}],
|
|
|
|
"gotta": [{ORTH: "got"}, {ORTH: "ta", NORM: "to"}],
|
|
|
|
"Gotta": [{ORTH: "Got", NORM: "got"}, {ORTH: "ta", NORM: "to"}],
|
|
|
|
"let's": [{ORTH: "let"}, {ORTH: "'s", NORM: "us"}],
|
|
|
|
"Let's": [{ORTH: "Let", NORM: "let"}, {ORTH: "'s", NORM: "us"}],
|
|
|
|
"c'mon": [{ORTH: "c'm", NORM: "come"}, {ORTH: "on"}],
|
|
|
|
"C'mon": [{ORTH: "C'm", NORM: "come"}, {ORTH: "on"}],
|
2017-01-05 21:59:06 +03:00
|
|
|
}
|
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc.update(_other_exc)
|
2017-01-05 21:59:06 +03:00
|
|
|
|
2016-12-08 14:47:01 +03:00
|
|
|
|
2017-05-08 16:47:25 +03:00
|
|
|
for exc_data in [
|
2020-07-23 00:09:01 +03:00
|
|
|
{ORTH: "'S", NORM: "'s"},
|
|
|
|
{ORTH: "'s", NORM: "'s"},
|
|
|
|
{ORTH: "\u2018S", NORM: "'s"},
|
|
|
|
{ORTH: "\u2018s", NORM: "'s"},
|
|
|
|
{ORTH: "and/or", NORM: "and/or"},
|
|
|
|
{ORTH: "w/o", NORM: "without"},
|
|
|
|
{ORTH: "'re", NORM: "are"},
|
|
|
|
{ORTH: "'Cause", NORM: "because"},
|
|
|
|
{ORTH: "'cause", NORM: "because"},
|
|
|
|
{ORTH: "'cos", NORM: "because"},
|
|
|
|
{ORTH: "'Cos", NORM: "because"},
|
|
|
|
{ORTH: "'coz", NORM: "because"},
|
|
|
|
{ORTH: "'Coz", NORM: "because"},
|
|
|
|
{ORTH: "'cuz", NORM: "because"},
|
|
|
|
{ORTH: "'Cuz", NORM: "because"},
|
|
|
|
{ORTH: "'bout", NORM: "about"},
|
|
|
|
{ORTH: "ma'am", NORM: "madam"},
|
|
|
|
{ORTH: "Ma'am", NORM: "madam"},
|
|
|
|
{ORTH: "o'clock", NORM: "o'clock"},
|
|
|
|
{ORTH: "O'clock", NORM: "o'clock"},
|
|
|
|
{ORTH: "lovin'", NORM: "loving"},
|
|
|
|
{ORTH: "Lovin'", NORM: "loving"},
|
|
|
|
{ORTH: "lovin", NORM: "loving"},
|
|
|
|
{ORTH: "Lovin", NORM: "loving"},
|
|
|
|
{ORTH: "havin'", NORM: "having"},
|
|
|
|
{ORTH: "Havin'", NORM: "having"},
|
|
|
|
{ORTH: "havin", NORM: "having"},
|
|
|
|
{ORTH: "Havin", NORM: "having"},
|
|
|
|
{ORTH: "doin'", NORM: "doing"},
|
|
|
|
{ORTH: "Doin'", NORM: "doing"},
|
|
|
|
{ORTH: "doin", NORM: "doing"},
|
|
|
|
{ORTH: "Doin", NORM: "doing"},
|
|
|
|
{ORTH: "goin'", NORM: "going"},
|
|
|
|
{ORTH: "Goin'", NORM: "going"},
|
|
|
|
{ORTH: "goin", NORM: "going"},
|
|
|
|
{ORTH: "Goin", NORM: "going"},
|
|
|
|
{ORTH: "Mt.", NORM: "Mount"},
|
|
|
|
{ORTH: "Ak.", NORM: "Alaska"},
|
|
|
|
{ORTH: "Ala.", NORM: "Alabama"},
|
|
|
|
{ORTH: "Apr.", NORM: "April"},
|
|
|
|
{ORTH: "Ariz.", NORM: "Arizona"},
|
|
|
|
{ORTH: "Ark.", NORM: "Arkansas"},
|
|
|
|
{ORTH: "Aug.", NORM: "August"},
|
|
|
|
{ORTH: "Calif.", NORM: "California"},
|
|
|
|
{ORTH: "Colo.", NORM: "Colorado"},
|
|
|
|
{ORTH: "Conn.", NORM: "Connecticut"},
|
|
|
|
{ORTH: "Dec.", NORM: "December"},
|
|
|
|
{ORTH: "Del.", NORM: "Delaware"},
|
|
|
|
{ORTH: "Feb.", NORM: "February"},
|
|
|
|
{ORTH: "Fla.", NORM: "Florida"},
|
|
|
|
{ORTH: "Ga.", NORM: "Georgia"},
|
|
|
|
{ORTH: "Ia.", NORM: "Iowa"},
|
|
|
|
{ORTH: "Id.", NORM: "Idaho"},
|
|
|
|
{ORTH: "Ill.", NORM: "Illinois"},
|
|
|
|
{ORTH: "Ind.", NORM: "Indiana"},
|
|
|
|
{ORTH: "Jan.", NORM: "January"},
|
|
|
|
{ORTH: "Jul.", NORM: "July"},
|
|
|
|
{ORTH: "Jun.", NORM: "June"},
|
|
|
|
{ORTH: "Kan.", NORM: "Kansas"},
|
|
|
|
{ORTH: "Kans.", NORM: "Kansas"},
|
|
|
|
{ORTH: "Ky.", NORM: "Kentucky"},
|
|
|
|
{ORTH: "La.", NORM: "Louisiana"},
|
|
|
|
{ORTH: "Mar.", NORM: "March"},
|
|
|
|
{ORTH: "Mass.", NORM: "Massachusetts"},
|
|
|
|
{ORTH: "May.", NORM: "May"},
|
|
|
|
{ORTH: "Mich.", NORM: "Michigan"},
|
|
|
|
{ORTH: "Minn.", NORM: "Minnesota"},
|
|
|
|
{ORTH: "Miss.", NORM: "Mississippi"},
|
|
|
|
{ORTH: "N.C.", NORM: "North Carolina"},
|
|
|
|
{ORTH: "N.D.", NORM: "North Dakota"},
|
|
|
|
{ORTH: "N.H.", NORM: "New Hampshire"},
|
|
|
|
{ORTH: "N.J.", NORM: "New Jersey"},
|
|
|
|
{ORTH: "N.M.", NORM: "New Mexico"},
|
|
|
|
{ORTH: "N.Y.", NORM: "New York"},
|
|
|
|
{ORTH: "Neb.", NORM: "Nebraska"},
|
|
|
|
{ORTH: "Nebr.", NORM: "Nebraska"},
|
|
|
|
{ORTH: "Nev.", NORM: "Nevada"},
|
|
|
|
{ORTH: "Nov.", NORM: "November"},
|
|
|
|
{ORTH: "Oct.", NORM: "October"},
|
|
|
|
{ORTH: "Okla.", NORM: "Oklahoma"},
|
|
|
|
{ORTH: "Ore.", NORM: "Oregon"},
|
|
|
|
{ORTH: "Pa.", NORM: "Pennsylvania"},
|
|
|
|
{ORTH: "S.C.", NORM: "South Carolina"},
|
|
|
|
{ORTH: "Sep.", NORM: "September"},
|
|
|
|
{ORTH: "Sept.", NORM: "September"},
|
|
|
|
{ORTH: "Tenn.", NORM: "Tennessee"},
|
|
|
|
{ORTH: "Va.", NORM: "Virginia"},
|
|
|
|
{ORTH: "Wash.", NORM: "Washington"},
|
|
|
|
{ORTH: "Wis.", NORM: "Wisconsin"},
|
💫 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-08 16:47:25 +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
|
|
|
"'d",
|
|
|
|
"a.m.",
|
|
|
|
"Adm.",
|
|
|
|
"Bros.",
|
|
|
|
"co.",
|
|
|
|
"Co.",
|
|
|
|
"Corp.",
|
|
|
|
"D.C.",
|
|
|
|
"Dr.",
|
|
|
|
"e.g.",
|
|
|
|
"E.g.",
|
|
|
|
"E.G.",
|
|
|
|
"Gen.",
|
|
|
|
"Gov.",
|
|
|
|
"i.e.",
|
|
|
|
"I.e.",
|
|
|
|
"I.E.",
|
|
|
|
"Inc.",
|
|
|
|
"Jr.",
|
|
|
|
"Ltd.",
|
|
|
|
"Md.",
|
|
|
|
"Messrs.",
|
|
|
|
"Mo.",
|
|
|
|
"Mont.",
|
|
|
|
"Mr.",
|
|
|
|
"Mrs.",
|
|
|
|
"Ms.",
|
|
|
|
"p.m.",
|
|
|
|
"Ph.D.",
|
2019-07-19 10:58:50 +03:00
|
|
|
"Prof.",
|
💫 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
|
|
|
"Rep.",
|
|
|
|
"Rev.",
|
|
|
|
"Sen.",
|
|
|
|
"St.",
|
|
|
|
"vs.",
|
2019-08-20 18:36:34 +03:00
|
|
|
"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
|
|
|
]:
|
2017-05-08 16:47:25 +03:00
|
|
|
_exc[orth] = [{ORTH: orth}]
|
|
|
|
|
|
|
|
|
|
|
|
for string in _exclude:
|
|
|
|
if string in _exc:
|
|
|
|
_exc.pop(string)
|
|
|
|
|
|
|
|
|
2020-07-22 23:18:46 +03:00
|
|
|
TOKENIZER_EXCEPTIONS = update_exc(BASE_EXCEPTIONS, _exc)
|