Carlos-Francisco Méndez-Cruz

New terminological tagging for CRFs

......@@ -136,6 +136,7 @@ if __name__ == "__main__":
if len(word) > 1:
for termTag in hashTerms:
if word in hashTerms[termTag]:
if word.find('-') > -1:
wordOrig = word.replace('-', ' ')
#print("Word: {}".format(word))
if wordOrig in hashTermsOrig[termTag]:
......@@ -146,7 +147,8 @@ if __name__ == "__main__":
line.rstrip('\n')
else:
line = listLine1[0] + '\t' + listLine1[1] + '\t' + listLine2[0] + ' ' + termTag + ' TermTag'
#line = listLine1[0] + '\t' + termTag + '\t' + listLine2[0] + ' ' + termTag + ' TermTag'
else:
line = listLine1[0] + '\t' + listLine1[1] + '\t' + listLine2[0] + ' ' + termTag + ' TermTag'
else:
line = listLine1[0] + '\t' + listLine1[1] + '\t' + listLine2[0] + ' ' + 'O' + ' TermTag'
# line = listLine1[0] + '\t' + termTag + '\t' + listLine2[0] + ' ' + termTag + ' TermTag'
......