FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-frog/example.py at master · proycon/python-frog · GitHub
proycon
/
python-frog
Public
Notifications
You must be signed in to change notification settings
Fork
10
Star
50
Code
Issues
6
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-frog
/
example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (15 loc) · 676 Bytes
Breadcrumbs
python-frog
/
example.py
Copy path
File metadata and controls
20 lines (15 loc) · 676 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from
__future__
import
print_function
,
unicode_literals
from
frog
import
Frog
,
FrogOptions
frog
=
Frog
(
FrogOptions
(
parser
=
True
))
output
=
frog
.
process_raw
(
"Dit is een test"
)
print
(
"RAW OUTPUT="
,
output
)
output
=
frog
.
process
(
"Dit is nog een test."
)
print
(
"PARSED OUTPUT="
,
output
)
frog
=
Frog
(
FrogOptions
(
parser
=
True
,
xmlout
=
True
))
output
=
frog
.
process
(
"Dit is een FoLiA test."
)
#output is now no longer a string but an instance of folia.Document, provided by the FoLiA library in FoLiaPy
print
(
"FOLIA OUTPUT="
)
print
(
output
.
xmlstring
())
print
(
"Inspecting FoLiA output (example):"
)
for
word
in
output
.
words
():
print
(
word
.
text
()
+
" "
+
word
.
pos
()
+
" "
+
word
.
lemma
())
Back
|
FazBrowse Home
|
New Git URL