Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 💫 sent char_span through with spaCy & regex & ♻️ Refactoring for more languages support #63

Merged
merged 26 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
35b4027
✨ 💫 sent char_span through with spaCy & regex
nipunsadvilkar May 26, 2020
32b53f7
⬆️ Add spacy dependency
nipunsadvilkar May 29, 2020
ac6e83d
Create python-package.yml
nipunsadvilkar May 29, 2020
4b8d87d
Merge pull request #64 from nipunsadvilkar/npn-github-actions-ci
nipunsadvilkar May 29, 2020
55def2e
💚 👷 Fix Github Actions & rm travis CI
nipunsadvilkar May 29, 2020
579cb19
🐛 Add requirements.txt
nipunsadvilkar May 29, 2020
68dc962
🎨 ✅ Add tests for resolved issues
nipunsadvilkar May 29, 2020
833062f
🎨 Update badge
nipunsadvilkar May 29, 2020
382d04b
🐛 Limit NUMBERED_REFERENCE_REGEX for zero or one time
nipunsadvilkar May 29, 2020
1751cc7
⬆️ Update setup.py
nipunsadvilkar May 30, 2020
99c7c69
🚧 language specific refactoring
nipunsadvilkar May 31, 2020
be851e0
🚧 ♻️ language specific refactoring 2
nipunsadvilkar May 31, 2020
655c837
🚧 ♻️ language specific refactoring 3
nipunsadvilkar May 31, 2020
7e52f8d
🎨 ✅ ♻️ 💫 Add hindi language support
nipunsadvilkar May 31, 2020
2efad05
🐛 hindi testcase with space
nipunsadvilkar May 31, 2020
f623387
🐛 hindi testcase arg fix in fixture
nipunsadvilkar May 31, 2020
ab39442
✨ Add support for Marathi language
nipunsadvilkar Jun 1, 2020
4249021
✅ 💚 Add code coverage - coverage.py
nipunsadvilkar Jun 6, 2020
c9ae31a
👷 Add Codecov GitHub Action
nipunsadvilkar Jun 6, 2020
68fbae8
👷 Add name of Codecov to GitHub Action
nipunsadvilkar Jun 6, 2020
e39f3aa
🎨 Add codecov to README.md
nipunsadvilkar Jun 6, 2020
092764f
✨ 💫 Add support for Chinese language
nipunsadvilkar Jun 6, 2020
ed6fb86
✨ 💫 Add support for Spanish language
nipunsadvilkar Jun 9, 2020
8917b35
♻️ Refactor char_span functionality
nipunsadvilkar Jun 9, 2020
b6e117f
🔖 Bump up version to v0.3.0rc
nipunsadvilkar Jun 9, 2020
0ab7a6f
📝 Update CHANGELOG.md
nipunsadvilkar Jun 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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