-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from UUDigitalHumanitieslab/subj-reworked
Subj reworked
- Loading branch information
Showing
17 changed files
with
180 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# 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: Unit tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Prepare PIP package | ||
run: | | ||
cd pypi | ||
./prepare.sh | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 $(cat pypi/include.txt | grep \.py\$) --count --max-complexity=12 --max-line-length=127 --statistics | ||
# - name: Run unit tests | ||
# run: | | ||
# pip install pytest | ||
# python -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
include sastadev/LICENSE | ||
include sastadev/*.txt | ||
include sastadev/celexlexicon/dutch/*.txt | ||
include sastadev/names/nameparts/namepartlexicon.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
#!/usr/bin/env python3 | ||
import logging | ||
import os.path as op | ||
import sentence_parser | ||
|
||
# logging object | ||
SDLOGGER = logging.getLogger() | ||
|
||
SD_DIR = op.dirname(op.abspath(__file__)) | ||
|
||
# Alpino | ||
ALPINO_HOST = 'localhost' | ||
ALPINO_PORT = 7001 | ||
|
||
# Function to parse a sentence with Alpino | ||
# Should take a string as input and return an lxml.etree | ||
PARSE_FUNC = sentence_parser.parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
__init__.py | ||
alpinoparsing.py | ||
celexlexicon | ||
celexlexicon.py | ||
deregularise.py | ||
inflectioncorrection.tsv.txt | ||
lexicon.py | ||
LICENSE | ||
memoize.py | ||
metadata.py | ||
namepartlexicon.py | ||
names | ||
py.typed | ||
query.py | ||
sastatoken.py | ||
sastatypes.py | ||
sentence_parser.py | ||
stringfunctions.py | ||
treebankfunctions.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
from setuptools import setup, find_packages | ||
from setuptools import setup | ||
|
||
with open('README.md') as file: | ||
long_description = file.read() | ||
|
||
setup( | ||
name='sastadev', | ||
python_requires='>=3.5, <4', | ||
version='0.0.2', | ||
python_requires='>=3.7, <4', | ||
version='0.0.3', | ||
description='Linguistic functions for SASTA tool', | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author='Digital Humanities Lab, Utrecht University', | ||
author_email='digitalhumanities@uu.nl', | ||
url='https://github.com/UUDigitalHumanitieslab/sastadev', | ||
license='BSD-3-Clause', | ||
include_package_data=True, | ||
packages=['sastadev'], | ||
package_data={'sastadev': ['*.txt', 'LICENSE', 'py.typed']} | ||
package_data={ | ||
'sastadev': ['*.txt', 'LICENSE', 'py.typed'] | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.