Skip to content

Commit

Permalink
Remove spurious files from sdist, bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelloPerathoner committed Oct 9, 2023
1 parent dc0872e commit b83c881
Show file tree
Hide file tree
Showing 28 changed files with 73 additions and 13,278 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ uninstall:
$(BIN)pip uninstall super_collator

clean:
-rm -rf dist build htmlcov .mypy_cache .pytest_cache .tox *.egg-info
-rm -rf build dist docs/_build htmlcov .mypy_cache .pytest_cache .tox *.egg-info
-rm docs/_images/badge*.svg
-rm *~ .*~ pylintgraph.dot
-find . -name __pycache__ -type d -exec rm -r "{}" \;
2 changes: 1 addition & 1 deletion docs/_build/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 09c61f55f04602556a5f29ff606f7d4f
config: 5a894f88038ba295758634591d362168
tags: 645f666f9bcd5a90fca523b33c5a78b7
23 changes: 18 additions & 5 deletions docs/_build/_sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Align two strings with relaxed spelling using N-Grams:
>>> b = [NGrams(s).load(s, 3) for s in b.split()]
>>>
>>> a, b, score = aligner.align(a, b, NGrams.similarity, lambda: NGrams("-"))
>>> print(to_table(list(map(str, a)), list(map(str, b)))) # doctest: +NORMALIZE_WHITESPACE
>>> print(
... to_table(list(map(str, a)), list(map(str, b)))
... ) # doctest: +NORMALIZE_WHITESPACE
- Lorem ipsum - dollar - amat - adipiscing elit
qui dolorem ipsum quia dolor sit amet consectetur adipisci velit
Expand All @@ -45,9 +47,11 @@ Multiple alignment: We repeatedly align two lists of NGrams against each other.
... if score > sim:
... sim = score
... return sim
...
>>>
>>> def merge(aa, bb):
... return [a + b for a, b in zip(aa, bb)]
...
>>>
>>> aligner = Aligner(-1.0, -0.5, -0.5)
>>> a = "qui dolorem ipsum quia dolor sit amet consectetur adipisci velit"
Expand All @@ -58,12 +62,18 @@ Multiple alignment: We repeatedly align two lists of NGrams against each other.
>>> b = [[NGrams(s).load(s, 2)] for s in b.split()]
>>> c = [[NGrams(s).load(s, 2)] for s in c.split()]
>>>
>>> a, b, score = aligner.align(a, b, similarity, lambda: [NGrams("-")], lambda: [NGrams("-")])
>>> a, b, score = aligner.align(
... a, b, similarity, lambda: [NGrams("-")], lambda: [NGrams("-")]
... )
>>> ab = merge(a, b)
>>> ab, c, score = aligner.align(ab, c, similarity, lambda: [NGrams("-")] * 2, lambda: [NGrams("-")])
>>> ab, c, score = aligner.align(
... ab, c, similarity, lambda: [NGrams("-")] * 2, lambda: [NGrams("-")]
... )
>>> abc = merge(ab, c)
>>>
>>> print(to_table(*zip(*[[t.user_data for t in nn] for nn in abc]))) # doctest: +NORMALIZE_WHITESPACE
>>> print(
... to_table(*zip(*[[t.user_data for t in nn] for nn in abc]))
... ) # doctest: +NORMALIZE_WHITESPACE
qui dolorem ipsum quia dolor sit amet consectetur adipisci velit
- Lorem ipsum - - - - - adipiscing -
- Lorem - - dollar - amat - - elit
Expand All @@ -87,6 +97,7 @@ Align two sentences using their part-of-speech tags only:
... @staticmethod
... def similarity(a, b):
... return 1.0 if a.pos == b.pos else 0.0
...
>>>
>>> aligner = Aligner()
>>> a = "it/PRP was/VBD a/DT dark/JJ and/CC stormy/JJ night/NN"
Expand All @@ -96,6 +107,8 @@ Align two sentences using their part-of-speech tags only:
>>> b = [PosToken(*s.split("/")) for s in b.split()]
>>>
>>> c, d, score = aligner.align(a, b, PosToken.similarity, lambda: PosToken("-", ""))
>>> print(to_table(list(map(str, c)), list(map(str, d)))) # doctest: +NORMALIZE_WHITESPACE
>>> print(
... to_table(list(map(str, c)), list(map(str, d)))
... ) # doctest: +NORMALIZE_WHITESPACE
it was a dark and stormy night
it is a fine - - day
4 changes: 0 additions & 4 deletions docs/_build/_sources/strategy.rst.txt

This file was deleted.

4 changes: 0 additions & 4 deletions docs/_build/_sources/token.rst.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/_build/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.0.4',
VERSION: '0.0.5',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit b83c881

Please sign in to comment.