neelsahu commited on
Commit
2513a9d
1 Parent(s): 6fac4f8

share = true removed3

Browse files
Files changed (1) hide show
  1. language_detection.py +1 -2
language_detection.py CHANGED
@@ -1,4 +1,3 @@
1
- import nltk
2
  from nltk.corpus import wordnet
3
  import re
4
  from nltk.stem import WordNetLemmatizer
@@ -210,7 +209,7 @@ def en_hi_detection(text):
210
  for pos in [wordnet.NOUN, wordnet.VERB, wordnet.ADJ, wordnet.ADV]:
211
  # print(f"{word} ({pos}): {lemmatizer.lemmatize(word, pos)}")
212
  lem_word = lemmatizer.lemmatize(word, pos)
213
- if lem_word in nltk.corpus.wordnet.words():
214
  count_en+=1
215
  break
216
  elif lem_word in stop_words:
 
 
1
  from nltk.corpus import wordnet
2
  import re
3
  from nltk.stem import WordNetLemmatizer
 
209
  for pos in [wordnet.NOUN, wordnet.VERB, wordnet.ADJ, wordnet.ADV]:
210
  # print(f"{word} ({pos}): {lemmatizer.lemmatize(word, pos)}")
211
  lem_word = lemmatizer.lemmatize(word, pos)
212
+ if lem_word in wordnet.words():
213
  count_en+=1
214
  break
215
  elif lem_word in stop_words: