security check
This commit is contained in:
parent
daee1668b0
commit
979e2bf9aa
@ -35,7 +35,7 @@ class LemmatizerResource(Resource):
|
|||||||
return {'tokens':' '.join(tokens), 'isFirstLemmatized':self.isFirstLemmatized(raw_tokens, language)}
|
return {'tokens':' '.join(tokens), 'isFirstLemmatized':self.isFirstLemmatized(raw_tokens, language)}
|
||||||
|
|
||||||
def isFirstLemmatized(self, raw_tokens, language):
|
def isFirstLemmatized(self, raw_tokens, language):
|
||||||
if language == 'pl':
|
if language == 'pl' and len(raw_tokens) > 0:
|
||||||
first_token = raw_tokens[0]
|
first_token = raw_tokens[0]
|
||||||
if self.lemmatizeWord(first_token, language) != first_token:
|
if self.lemmatizeWord(first_token, language) != first_token:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user