-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help for script adaptation! #1
Comments
Hello, TEPROLIN does not output the "_upos" field. POS tagging fields are "_ctg" (you can use this one instead of _upos, although it does not contain the UPOS tags for Romanian) and "_msd" which is the detailed version of "_ctg" with many more morphological attributes. To see how "_ctg" and "_msd" map to UPOS, you can check out the Romanian UD corpus here: If you use the UDPipe NLP app of TEPROLIN (TTL is the default one), I think the '_ctg' field contains the actual UPOS of the token. But you have to install UDPipe first, as instructed in the README. |
ING: Modul de a lucra și a rezolva problema din TEPROLIN Issue #1
pip install -r requirements.txt
cpan install Unicode::String Algorithm::Diff BerkeleyDB File::Which File::HomeDir
java -version
python3 TeproREST.py
uwsgi --socket 0.0.0.0:5000 --protocol=http -w TeproREST:app
curl -X POST -H "Content-Type: application/json"
{
import requests url = "http://127.0.0.1:5000/process" response = requests.post(url, json=payload, headers=headers) if response.status_code == 200:
{
perl -c TeproTTL.pl
python3 TeproREST.py --debug
operations = ["tokenize", "pos", "ner", "parse"]
|
import requests Define the text and processing operationstext = "România este o țară frumoasă cu o istorie bogată." Construct the payload for the POST requestpayload = { Define the URL for the TEPROLIN REST APIurl = "http://127.0.0.1:5000/process" Send the POST request to the APItry:
except requests.exceptions.RequestException as e: |
Acest fragment de cod este pentru verificarea răspunsului unei solicitări HTTP. Totuși, nu include o solicitare HTTP completă, dar îți pot explica ce face și cum să-l utilizezi corect: Probleme și soluții: import requests url = "https://example.com/api/endpoint" # Înlocuiește cu URL-ul tău if response.status_code == 200:
pip install requests
|
The result is:
{
"_bner": "",
"_chunk": "Np#1",
"chunk_det": "Ion",
"_ctg": "NP",
"_deprel": "nsubj",
"_expand": "",
"_head": 4,
"_id": 1,
"_lemma": "Ion",
"_msd": "Np",
"_ner": "PER",
"_ner_2": "",
"_phon": "",
"_syll": "",
"_wordform": "Ion",
"_upos": ""
},
{
"_bner": "",
"_chunk": "Vp#1",
"chunk_det": "și- a cumpărat",
"_ctg": "PXD",
"_deprel": "expl:poss",
"_expand": "",
"_head": 4,
"_id": 2,
"_lemma": "sine",
"_msd": "Px3--d--y-----w",
"_ner": "",
"_ner_2": "",
"_phon": "",
"_syll": "",
"_wordform": "și-",
"_upos": ""
},
The upos form is always empty, could you suggest the reason?
The text was updated successfully, but these errors were encountered: