diff --git a/wordnet/nltk.py b/wordnet/nltk.py index 65b26b4..97eb6b2 100644 --- a/wordnet/nltk.py +++ b/wordnet/nltk.py @@ -2,7 +2,7 @@ from nltk.corpus.reader.wordnet import Synset import re -format_regexp = r'^\W*\((?P\w+)\)\W+(?P\w.*)\W*\#\W*(?P\d+)\W*\Z' +format_regexp = r'^\s*\((?P\w+)\)\s+(?P[^\s]+)\s*\#\s*(?P\d+)\s*\Z' def candidates(keyword): if not keyword: