Skip to content Skip to sidebar Skip to footer

Use Concordance To Find Hyphenated Words

I was able to get the expected output of this book, page 4 'Searching Text'. When I tried to apply it to my case I got No matches which was not my expected output. I think I'm not

Solution 1:

Need to change your code little bit.

importnltkf= open("/path/to/file") //path of the file
raw = f.read()
text = nltk.Text(raw)
text.concordance("-")

Required Output: information concordance

Post a Comment for "Use Concordance To Find Hyphenated Words"