Ejemplo n.º 1
0
Archivo: dict.py Proyecto: dbryla/nlp
def check_if_verb(word):
	#print word
	ids = clp(word)
	for id in ids:
	#	print word, clp.vec(id, word)
		if clp.vec(id, word) not in [1, 45, 46, 47, 13, 14] and word not in [u'był', 'jest', u'była']:
			return clp.label(id)[0] == 'B'
		else:
			return False
Ejemplo n.º 2
0
    def _find_verb(self, text_list):

        for element in text_list:
            i = clp.rec(element)
            if clp.label(i[0]) == clp.PLP.CZESCI_MOWY.CZASOWNIK:
                forms = clp.forms(i[0])
                if len(forms) > 0 and forms[0] == element:
                    return element

        return "unavailable"
	def _find_verb(self,text_list):


		for element in text_list:
			i = clp.rec(element)
			if clp.label(i[0]) == clp.PLP.CZESCI_MOWY.CZASOWNIK:
				forms = clp.forms(i[0])
				if len(forms) > 0 and forms[0] == element:
					return element

		return "unavailable"