Skip to content

Commit 66e8aca

Browse files
committed
Load Punkt collocations as a set
1 parent 980f435 commit 66e8aca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nltk/tokenize/punkt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ def load_punkt_params(lang_dir):
17611761
# Make a new Parameters object:
17621762
params = PunktParameters()
17631763
with open(f"{lang_dir}/collocations.tab", encoding="utf-8") as f:
1764-
params.collocations = pdec.tab2tups(f)
1764+
params.collocations = set(pdec.tab2tups(f))
17651765
with open(f"{lang_dir}/sent_starters.txt", encoding="utf-8") as f:
17661766
params.sent_starters = pdec.txt2set(f)
17671767
with open(f"{lang_dir}/abbrev_types.txt", encoding="utf-8") as f:

0 commit comments

Comments
 (0)