Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update

  • Loading branch information...
commit e17ff35693d0e1ef704928afa10ac22f9e57aef6 1 parent d5de9ed
Maarten van Gompel authored

Showing 3 changed files with 2 additions and 4 deletions. Show diff stats Hide diff stats

  1. +1 1  formats/moses.py
  2. +1 1  setup.py
  3. +0 2  textprocessors.py
2  formats/moses.py
@@ -65,7 +65,7 @@ def __init__(self,filename, quiet=False, reverse=False, delimiter="|||", score_c
65 65 source = segments[0] #tuple(segments[0].split(" "))
66 66 target = segments[1] #tuple(segments[1].split(" "))
67 67
68   - if max_sourcen == 0 or (len(source.split(' ')) <= max_sourcen):
  68 + if max_sourcen == 0 or (len(source.split(' ')) <= max_sourcen):
69 69 self.append(source, target,Pst,Pts,null_alignments)
70 70
71 71 f.close()
2  setup.py
@@ -20,7 +20,7 @@ def read(fname):
20 20
21 21 setup(
22 22 name = "PyNLPl",
23   - version = "0.5.4.2",
  23 + version = "0.5.4.3",
24 24 author = "Maarten van Gompel",
25 25 author_email = "proycon@anaproy.nl",
26 26 description = ("PyNLPl, pronounced as 'pineapple', is a Python library for Natural Language Processing. It contains various modules useful for common, and less common, NLP tasks. PyNLPl can be used for example the computation of n-grams, frequency lists and distributions, language models. There are also more complex data types, such as Priority Queues, and search algorithms, such as Beam Search."),
2  textprocessors.py
@@ -222,8 +222,6 @@ def strip_accents(s, encoding= 'utf-8'):
222 222 else:
223 223 return unicodedata.normalize('NFKD', unicode(s,encoding)).encode('ASCII', 'ignore')
224 224
225   -
226   -
227 225 def swap(tokens, maxdist=2):
228 226 """Perform a swap operation on a sequence of tokens, exhaustively swapping all tokens up to the maximum specified distance. This is a subset of all permutations."""
229 227 assert maxdist >= 2

0 comments on commit e17ff35

Please sign in to comment.
Something went wrong with that request. Please try again.