TransWikia.com

Difference between from nltk import word_tokenize and from nltk.tokenize import word_tokenize?

Data Science Asked by Manasvi Duggal on December 5, 2020

What is the difference between the word_tokenize, one imported directly from nltk and the other being imported from tokenize package of nltk?

One Answer

So basically

from nltk import word_tokenize

and

from nltk.tokenize import word_tokenize

from nltk import word_tokenize is basing to the same tokenizeAPI as both are the same with the usage and I don't see any difference in the results which they give.

Correct answer by Sundeep Pidugu on December 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP