Skip to content
Snippets Groups Projects
Commit ba41b2c3 authored by Noah Heuser's avatar Noah Heuser
Browse files

Merge branch 'main' of git@gitlab.uni-koblenz.de:nheuser/gptgrammarparsing.git into main

parents 3545e514 c827977d
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,18 @@ import json
if __name__ == "__main__":
with open('grammarWordsPairs.txt') as grammarWordsPairs:
s = grammarWordsPairs.read()
array = json.loads(s)
jsonArray = grammarWordsPairs.read()
with open('resultsOfMembershipTest.txt') as results:
resultArray = results.readlines()
array = json.loads(jsonArray)
for e in array:
for key in e:
print(key)
print(e[key])
\ No newline at end of file
print(e[key])
i = 0
for v in resultArray:
if v == "\n":
i += 1
continue
value = v[0:len(v) - 1]
print(f"Grammar {i}: {value}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment