new evaluate
This commit is contained in:
parent
be71442103
commit
c852703065
@ -20,6 +20,8 @@ for file_name in os.listdir('data'):
|
||||
for row in data:
|
||||
rows += 1
|
||||
sentence = row[1]
|
||||
sentences = sentence.split(',')
|
||||
for sentence in sentences:
|
||||
for grammar in grammars:
|
||||
match = grammar.find_matching_rules(sentence)
|
||||
if match:
|
||||
@ -27,7 +29,8 @@ for file_name in os.listdir('data'):
|
||||
for act in acts:
|
||||
user_act = re.search(PATTERN, act).group()
|
||||
if user_act == grammar.name:
|
||||
print(grammar.name)
|
||||
hits += 1
|
||||
|
||||
print(f"Accuracy: {(hits / rows)*100}")
|
||||
# Dokładność 30%
|
||||
# Dokładność 44.6%
|
Loading…
Reference in New Issue
Block a user