Skip to content

Commit

Permalink
Merge pull request #166 from coderbhupendra/master
Browse files Browse the repository at this point in the history
changed sort according to pyuca rules.
  • Loading branch information
kylepjohnson committed Mar 5, 2016
2 parents b73a581 + e90222d commit b6c28cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cltk/utils/philology.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from nltk.text import ConcordanceIndex
from nltk.tokenize.punkt import PunktLanguageVars
import os
import pyuca


class Philology:
Expand Down Expand Up @@ -199,7 +200,8 @@ def return_concordance_all(self, tokens):
of lists.
"""

tokens = sorted(tokens) #! is the list order preserved?
coll = pyuca.Collator()
tokens = sorted(tokens, key=coll.sort_key) #! is the list order preserved?

concordance_list = []
for token in tokens:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
'regex',
'whoosh',
'fuzzywuzzy',
'python-Levenshtein'],
'python-Levenshtein',
'pyuca'],
keywords=['nlp', 'nltk', 'greek', 'latin'],
license='MIT',
long_description="The Classical Language Toolkit (CLTK) is a framework for natural language processing for Classical languages.", # pylint: disable=C0301
Expand Down

0 comments on commit b6c28cc

Please sign in to comment.