Skip to content

Commit e0cdada

Browse files
Merge pull request #63 from nipunsadvilkar/npn-char-span-fix
2 parents f7c640f + 0ab7a6f commit e0cdada

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1407
-653
lines changed

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[report]
2+
exclude_lines =
3+
pragma: no cover
4+
def __repr__
5+
if self.debug:
6+
if settings.DEBUG
7+
raise AssertionError
8+
raise NotImplementedError
9+
if 0:
10+
if __name__ == .__main__.:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.5, 3.6, 3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
- name: Lint with flake8
31+
run: |
32+
pip install flake8
33+
# stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
- name: Test with pytest
38+
run: |
39+
pip install pytest
40+
pip install pytest-cov
41+
pytest --cov=pysbd tests/ --color yes --cov-report=xml --cov-report=html
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v1.0.7
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
file: ./coverage.xml
47+
flags: unittests
48+
env_vars: OS,PYTHON
49+
name: codecov-umbrella
50+
fail_ci_if_error: true

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
1-
# v0.1.0
2-
3-
- Initial Release
4-
5-
# v0.1.1
6-
7-
- English language support only
8-
- Support for oother languages - WIP
9-
10-
# v0.1.2
1+
# v0.3.0rc
2+
- ✨ 💫 sent `char_span` through with spaCy & regex approach - \#63
3+
- ♻️ Refactoring to support multiple languages
4+
- ✨ 💫Initial language support for - Hindi, Marathi, Chinese, Spanish
5+
- ✅ Updated tests - more coverage & regression tests for issues
6+
- 👷👷🏻‍♀️ GitHub actions for CI-CD
7+
- 💚☂️ Add code coverage - coverage.py Add Codecov
8+
- 🐛 Fix incorrect text span & vanilla pysbd vs spacy output discrepancy - \#49, \#53, \#55 , \#59
9+
- 🐛 Fix `NUMBERED_REFERENCE_REGEX` for zero or one time - \#58
10+
- 🔐Fix security vulnerability bleach - \#62
1111

12-
- 🐛BugFix - IndexError of `scanlists` function
1312

14-
# v0.1.3
15-
16-
- 🐛 Fix `lists_item_replacer` - \#29
17-
- 🐛 Fix & ♻️refactor `replace_multi_period_abbreviations` - \#30
18-
- 🐛 Fix `abbreviation_replacer` - \#31
19-
- ✅ Add regression tests for issues
20-
21-
# v0.1.4
22-
23-
- ✨ ✅ Handle intermittent punctuations - \#34
13+
# v0.2.3
14+
- 🐛 Performance improvement in `abbreviation_replacer`- \#50
2415

25-
# v0.1.5
16+
# v0.2.2
17+
- 🐛 Fix unbalanced parenthesis - \#47
2618

27-
- 🐛 Handle text with only punctuations - \#36
28-
- 🐛 Handle exclamation marks at EOL- \#37
19+
# v0.2.1
20+
- ✨pySBD as a spaCy component through entrypoints
2921

3022
# v0.2.0
31-
3223
- ✨Add `char_span` parameter (optional) to get sentence & its (start, end) char offsets from original text
3324
- ✨pySBD as a spaCy component example
3425
- 🐛 Fix double question mark swallow bug - \#39
3526

36-
# v0.2.1
27+
# v0.1.5
28+
- 🐛 Handle text with only punctuations - \#36
29+
- 🐛 Handle exclamation marks at EOL- \#37
3730

38-
- ✨pySBD as a spaCy component through entrypoints
31+
# v0.1.4
32+
- ✨ ✅ Handle intermittent punctuations - \#34
3933

40-
# v0.2.2
34+
# v0.1.3
35+
- 🐛 Fix `lists_item_replacer` - \#29
36+
- 🐛 Fix & ♻️refactor `replace_multi_period_abbreviations` - \#30
37+
- 🐛 Fix `abbreviation_replacer` - \#31
38+
- ✅ Add regression tests for issues
4139

42-
- 🐛 Fix unbalanced parenthesis - \#47
40+
# v0.1.2
41+
- 🐛BugFix - IndexError of `scanlists` function
4342

44-
# v0.2.3
43+
# v0.1.1
44+
- English language support only
45+
- Support for oother languages - WIP
4546

46-
- 🐛 Performance improvement in `abbreviation_replacer`- \#50
47+
# v0.1.0
48+
- Initial Release

Pipfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7-
yapf = "*"
87
ipython = "*"
98
ipdb = "*"
109
twine = "*"
10+
pytest = "*"
11+
pytest-cov = "*"
1112

1213
[packages]
13-
pytest = "*"
14-
autopep8 = "*"
14+
spacy = "*"
1515

1616
[requires]
1717
python_version = "3.6"

0 commit comments

Comments
 (0)