Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GPTGrammarParsing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noah Heuser
GPTGrammarParsing
Commits
ba41b2c3
Commit
ba41b2c3
authored
10 months ago
by
Noah Heuser
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of git@gitlab.uni-koblenz.de:nheuser/gptgrammarparsing.git into main
parents
3545e514
c827977d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PythonAPI/sendRequest.py
+12
-3
12 additions, 3 deletions
PythonAPI/sendRequest.py
with
12 additions
and
3 deletions
PythonAPI/sendRequest.py
+
12
−
3
View file @
ba41b2c3
...
...
@@ -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
}
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment