Skip to content
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

issues in loading the server and applying the udpip2_client.py #181

Closed
hezaoke opened this issue Nov 17, 2023 · 3 comments
Closed

issues in loading the server and applying the udpip2_client.py #181

hezaoke opened this issue Nov 17, 2023 · 3 comments

Comments

@hezaoke
Copy link

hezaoke commented Nov 17, 2023

Hi!
I would like to load the server and then run the udpipe2_client.py to parse my input file with the English gum model. But when I tried to load the server, I could not make the following work in the command line (I cloned udpipe from github today):

python3 udpipe2_server.py
--logfile udpipe_server.log
--threads 4
--batch_size 32
--preload_models all
8001
en_gum-ud-2.12-230717
"en_gum-ud-2.12-230717:/path/to/en_gum-ud-2.12-230717.model:https://example.com"

error message:
udpipe2_server.py: error: the following arguments are required: port, default_model, models

Any advice?

Thank you in advance for your help!

Alan

@hezaoke
Copy link
Author

hezaoke commented Nov 17, 2023

Never mind, I found the solution by simplifying the arguments. And I've also applied the udpipe2_client.py.

However, I found that udpipe2_client.py takes only Conllu file as input and cannot process txt file. But I thought it could process a raw txt file to generate a conllu file. Should I look for something else? Or this might be because of some settings I did not realize? Is this because udpipe2 does not process the raw data from scratch, but uses the output from udpipe1 and revise the tagging and the parsing results?

If you would need to know my command line code to run the udpipe2_client.py file, please let me know.

I've changed the title in the hope that I can include this follow up question here.

@hezaoke hezaoke changed the title errors in loading the server errors in loading the server and applying the udpip2_client.py Nov 17, 2023
@hezaoke hezaoke changed the title errors in loading the server and applying the udpip2_client.py issues in loading the server and applying the udpip2_client.py Nov 17, 2023
@foxik
Copy link
Member

foxik commented Nov 18, 2023

Dear @hezaoke,

I am glad you found out the correct command line 👍

To process plain text files with udpipe2_client.py, the key is to include the --tokenizer= option, which changes input processing by assuming the input is a plain text file and tokenizing it (exactly as described in the REST API documentation https://lindat.mff.cuni.cz/services/udpipe/api-reference.php#process, because the udpipe2_client.py just forwards the specified request to the service).

Cheers!

@foxik foxik closed this as completed Nov 18, 2023
@hezaoke
Copy link
Author

hezaoke commented Nov 20, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants