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

Update dependencies #84

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ overflow-checks = false
[dependencies]
regex = "1"
lazy_static = "1.4.0"
seahash = "4.0.0"
itertools = "0.9"
seahash = "4.1.0"
itertools = "0.10.1"
ndarray = "0.13.0"
serde = { version = "1.0", features = ["derive"] }
sprs = {version = "0.7.1", default-features = false}
unicode-segmentation = "1.6.0"
unicode-segmentation = "1.7.1"
thiserror = "1.0"
hashbrown = { version = "0.8", features = ["rayon"] }
hashbrown = { version = "0.11.2", features = ["rayon"] }
rayon = {version = "1.3", optional = true}
dict_derive = {version = "0.2", optional = true}
pyo3 = {version = "0.10.1", optional = true}
Expand Down
10 changes: 8 additions & 2 deletions benchmarks/bench_sentence_tokenizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ def regexp_tokenizer(txt):

db = [
(r"Python re.split('(?<=[!.?])', ...)", regexp_tokenizer),
("UnicodeSentenceTokenizer()", UnicodeSentenceTokenizer().tokenize,),
("PunctuationTokenizer()", PunctuationTokenizer().tokenize,),
(
"UnicodeSentenceTokenizer()",
UnicodeSentenceTokenizer().tokenize,
),
(
"PunctuationTokenizer()",
PunctuationTokenizer().tokenize,
),
]

for label, func in db:
Expand Down
2 changes: 2 additions & 0 deletions ci/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ rustup default nightly-2020-06-01

cd python/
python -m pip install -r ../ci/requirements-build.txt

cargo tree
python setup.py bdist_wheel

pip install --pre --no-index --find-links dist/ vtext
4 changes: 3 additions & 1 deletion python/vtext/tests/test_tokenize_sentence.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def test_punctuation_sentence_tokenizer():

@hypothesis.given(st.text())
@pytest.mark.parametrize(
"tokenizer", [UnicodeSentenceTokenizer(), PunctuationTokenizer()], ids=_pytest_ids,
"tokenizer",
[UnicodeSentenceTokenizer(), PunctuationTokenizer()],
ids=_pytest_ids,
)
def test_tokenize_edge_cases(tokenizer, txt):
tokens = tokenizer.tokenize(txt)
Expand Down