Skip to content

Commit

Permalink
Merge pull request #63 from nipunsadvilkar/npn-char-span-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunsadvilkar authored Jun 9, 2020
2 parents f7c640f + 0ab7a6f commit e0cdada
Show file tree
Hide file tree
Showing 45 changed files with 1,407 additions and 653 deletions.
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
50 changes: 50 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
pytest --cov=pysbd tests/ --color yes --cov-report=xml --cov-report=html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

64 changes: 33 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# v0.1.0

- Initial Release

# v0.1.1

- English language support only
- Support for oother languages - WIP

# v0.1.2
# v0.3.0rc
- ✨ 💫 sent `char_span` through with spaCy & regex approach - \#63
- ♻️ Refactoring to support multiple languages
- ✨ 💫Initial language support for - Hindi, Marathi, Chinese, Spanish
- ✅ Updated tests - more coverage & regression tests for issues
- 👷👷🏻‍♀️ GitHub actions for CI-CD
- 💚☂️ Add code coverage - coverage.py Add Codecov
- 🐛 Fix incorrect text span & vanilla pysbd vs spacy output discrepancy - \#49, \#53, \#55 , \#59
- 🐛 Fix `NUMBERED_REFERENCE_REGEX` for zero or one time - \#58
- 🔐Fix security vulnerability bleach - \#62

- 🐛BugFix - IndexError of `scanlists` function

# v0.1.3

- 🐛 Fix `lists_item_replacer` - \#29
- 🐛 Fix & ♻️refactor `replace_multi_period_abbreviations` - \#30
- 🐛 Fix `abbreviation_replacer` - \#31
- ✅ Add regression tests for issues

# v0.1.4

- ✨ ✅ Handle intermittent punctuations - \#34
# v0.2.3
- 🐛 Performance improvement in `abbreviation_replacer`- \#50

# v0.1.5
# v0.2.2
- 🐛 Fix unbalanced parenthesis - \#47

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

# v0.2.0

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

# v0.2.1
# v0.1.5
- 🐛 Handle text with only punctuations - \#36
- 🐛 Handle exclamation marks at EOL- \#37

- ✨pySBD as a spaCy component through entrypoints
# v0.1.4
- ✨ ✅ Handle intermittent punctuations - \#34

# v0.2.2
# v0.1.3
- 🐛 Fix `lists_item_replacer` - \#29
- 🐛 Fix & ♻️refactor `replace_multi_period_abbreviations` - \#30
- 🐛 Fix `abbreviation_replacer` - \#31
- ✅ Add regression tests for issues

- 🐛 Fix unbalanced parenthesis - \#47
# v0.1.2
- 🐛BugFix - IndexError of `scanlists` function

# v0.2.3
# v0.1.1
- English language support only
- Support for oother languages - WIP

- 🐛 Performance improvement in `abbreviation_replacer`- \#50
# v0.1.0
- Initial Release
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
yapf = "*"
ipython = "*"
ipdb = "*"
twine = "*"
pytest = "*"
pytest-cov = "*"

[packages]
pytest = "*"
autopep8 = "*"
spacy = "*"

[requires]
python_version = "3.6"
Loading

0 comments on commit e0cdada

Please sign in to comment.