Skip to content

Commit a107a51

Browse files
committed
fixed some line spacing issues
1 parent 6570dca commit a107a51

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nltk/wsd.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@
1212

1313
def lesk(context_sentence, ambiguous_word, pos=None, synsets=None, lang="eng"):
1414
"""Return a synset for an ambiguous word in a context.
15+
1516
:param iter context_sentence: The context sentence where the ambiguous word
1617
occurs, passed as an iterable of words.
1718
:param str ambiguous_word: The ambiguous word that requires WSD.
1819
:param str pos: A specified Part-of-Speech (POS).
1920
:param iter synsets: Possible synsets of the ambiguous word.
2021
:param str lang: WordNet language.
2122
:return: ``lesk_sense`` The Synset() object with the highest signature overlaps.
23+
2224
This function is an implementation of the original Lesk algorithm (1986) [1].
25+
2326
Usage example::
27+
2428
>>> lesk(['I', 'went', 'to', 'the', 'bank', 'to', 'deposit', 'money', '.'], 'bank', 'n')
2529
Synset('savings_bank.n.02')
30+
2631
[1] Lesk, Michael. "Automatic sense disambiguation using machine
2732
readable dictionaries: how to tell a pine cone from an ice cream
2833
cone." Proceedings of the 5th Annual International Conference on

0 commit comments

Comments
 (0)