Estefani Gaytan Nunez

update

......@@ -137,28 +137,26 @@ def word2features(sent, i, S1, S2):
#====================== S1 ======================#
if S1:
listElem = sent[i - 1].split('|')
lemma1 = listElem[1]
postag1 = listElem[2]
print("S1")
features['hUpper']: hUpper(word)
features['hLower']: hUpper(word)
features['hGreek']: hGreek(word)
features['symb']: symb(word)
features['hUpper']= hUpper(word)
features['hLower']= hUpper(word)
features['hGreek']= hGreek(word)
features['symb']= symb(word)
#firstChar
features['lemma1[:1]']: lemma1[:1]
features['lemma[:1]']= lemma[:1]
features['postag[:1]']= postag[:1]
#secondChar
features['postag[:1]']: lemma1[:1]
features['postag[:2]']: lemma1[:2]
features['lemma[:2]']: lemma1[:2]
features['postag[:2]']= postag[:2]
features['lemma[:2]']= lemma[:2]
#====================== S2 ======================#
if S2:
#S2
features['isUpper']: word.isupper()
features['isLower']: word.isLower()
features['isGreek']: isGreek(word)
features['isNumber']: word.isdigit()
print("S2")
features['isUpper']= word.isupper()
features['isLower']= word.islower()
features['isGreek']= isGreek(word)
features['isNumber'] = word.isdigit()
'''
......@@ -348,7 +346,7 @@ if __name__ == "__main__":
# crf = rs.best_estimator_
nameReport = str(options.S1) + '_S2_' + str(options.S2) + str(options.version) + '.txt'
nameReport = 'S1_' + str(options.S1) + '_S2_' + str(options.S2) + str(options.version) + '.txt'
with open(os.path.join(options.outputPath, "reports", "report_" + nameReport), mode="w") as oFile:
oFile.write("********** TRAINING AND TESTING REPORT **********\n")
oFile.write("Training file: " + options.trainingFile + '\n')
......
No preview for this file type
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.