TurboParser icon indicating copy to clipboard operation
TurboParser copied to clipboard

Install on Windows 10

Open AhmadSawalhah opened this issue 7 years ago • 10 comments

Dear All How can I install this parser on python 3.4 , on Win10 environment I tried, but failed thanks

AhmadSawalhah avatar Jul 08 '17 12:07 AhmadSawalhah

What have you tried and where did it failed? Are you using visual studio solution, or a Ubuntu on Windows/cygwin approach?


From: AhmadSawalhah [email protected] Sent: Saturday, July 8, 2017 1:10:25 PM To: andre-martins/TurboParser Cc: Subscribed Subject: [andre-martins/TurboParser] Install on Windows 10 (#36)

Dear All How can I install this parser on python 3.4 , on Win10 environment I tried, but failed thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/andre-martins/TurboParser/issues/36, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFFRMqqb4jKN8vysrj69eWHqHR6V1cG-ks5sL3GxgaJpZM4ORuLZ.

davidalbertonogueira avatar Jul 08 '17 12:07 davidalbertonogueira

I installed ( bash ) for windows (shell.w32-ix86), and tried to run the scripts, it failed

AhmadSawalhah avatar Jul 08 '17 13:07 AhmadSawalhah

Dear Sir, Here is the error after running install_wrapper.sh ( Please any help!)

g++ -std=c++0x -O3 -Wall -Wno-sign-compare -c -fmessage-length=0 -fPIC -I../src/util/ -I../src/classifier -I../src/sequence -I../src/tagger -I../src/entity_recognizer -I../src/parser -I../src/semantic_parser -I../src/coreference_resolver -I../src/morphological_tagger -I../deps/local/include TurboParserInterface.cpp TurboParserInterface.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) #include <stdio.h> ^ In file included from TurboParserInterface.cpp:11:0: TurboParserInterface.h: In member function ‘void TurboParserInterface::TurboParserInterface::BuildArgumentList()’: TurboParserInterface.h:129:36: error: ‘strdup’ was not declared in this scope argv_[0] = strdup("TurboParser"); ^ make: *** [Makefile:31: TurboParserInterface.o] Error 1 running build_ext skipping 'turbo_parser.cpp' Cython extension (up-to-date) building 'turboparser' extension error: Unable to find vcvarsall.bat

AhmadSawalhah avatar Jul 09 '17 10:07 AhmadSawalhah

Hi again, On Windows, the supported approach is through the usage of Visual Studio. Can you try that and report back? Using the new Windows 10 feature "Bash on Ubuntu on Windows" should also work. Cygwin was never tested.

davidalbertonogueira avatar Jul 09 '17 12:07 davidalbertonogueira

Dear Sir, I installed ubuntu and did the installation, it worked fine and ran the python wrapper, all is ok ( it asked me to install NLTK, and I did) now when I write import nlp_pipeline it gives me this error

File "nlp_pipeline.py", line 4, in import turboparser as tp ImportError: libgflags.so.2: cannot open shared object file: No such file or directory

any help please?

AhmadSawalhah avatar Jul 13 '17 13:07 AhmadSawalhah

You need to add gflags to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path to your TurboParser folder>/deps/local/lib:

davidalbertonogueira avatar Jul 13 '17 16:07 davidalbertonogueira

Thank you very much, It worked great! but Do I need to do the export each time, How can I add it to Env. Variables? I searched the Net, please failed to find a method, Can you help please? I am newbie to Ubuntu thanks in advance

AhmadSawalhah avatar Jul 15 '17 14:07 AhmadSawalhah

Yes, you would need to do it each time. If you want to add permanently, check this: https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables

davidalbertonogueira avatar Jul 16 '17 12:07 davidalbertonogueira

Thank you Sir , and I apologize for all these questions, I appreciate your effort, I did every thin, And when I executed the example, I have this

print pipe.parse_conll('I solved the problem with statistics.', 'EN') No contraction splitter for language none. I0718 12:44:03.388650 3000 Options.cpp:64] Setting --test=1 I0718 12:44:03.388775 3000 TokenDictionary.cpp:47] Setting --form_case_sensitive=0 I0718 12:44:03.388842 3000 TokenDictionary.cpp:50] Setting --prefix_length=4 I0718 12:44:03.388903 3000 TokenDictionary.cpp:53] Setting --suffix_length=4 I0718 12:44:03.455808 3000 SequenceOptions.cpp:57] Setting --sequence_model_type=2 I0718 12:44:03.462049 3000 TaggerOptions.cpp:69] Setting --tagger_large_feature_set=0 I0718 12:44:03.462203 3000 TaggerOptions.cpp:73] Setting --tagger_prune_tags=1 I0718 12:44:03.656069 3000 SparseLabeledParameterVector.h:339] Statistics for labeled parameter vector: I0718 12:44:03.656214 3000 SparseLabeledParameterVector.h:340] Features with sparse labels: 45332 Total: 57721 Sparse labels: 121786 I0718 12:44:03.656277 3000 Parameters.cpp:32] Squared norm of the weight vector = 3537.41 I0718 12:44:03.656358 3000 Parameters.cpp:33] Number of features = 57721 I0718 12:44:03.656474 3000 TurboParserInterface.cpp:41] Took 0.267 sec. I0718 12:44:03.656606 3000 DependencyOptions.cpp:242] Arc factored parts enabled. I0718 12:44:03.656677 3000 DependencyOptions.cpp:245] Consecutive sibling parts enabled. I0718 12:44:03.656744 3000 DependencyOptions.cpp:248] Grandparent parts enabled. I0718 12:44:03.656852 3000 TokenDictionary.cpp:47] Setting --form_case_sensitive=0 I0718 12:44:03.656924 3000 TokenDictionary.cpp:50] Setting --prefix_length=4 I0718 12:44:03.656991 3000 TokenDictionary.cpp:53] Setting --suffix_length=4 I0718 12:44:03.781635 3000 DependencyOptions.cpp:151] Setting --model_type=full I0718 12:44:03.781939 3000 DependencyOptions.cpp:154] Setting --large_feature_set=1 I0718 12:44:03.782348 3000 DependencyOptions.cpp:157] Setting --labeled=1 I0718 12:44:03.782413 3000 DependencyOptions.cpp:160] Setting --projective=1 I0718 12:44:03.782560 3000 DependencyOptions.cpp:163] Setting --prune_labels=1 I0718 12:44:03.782711 3000 DependencyOptions.cpp:166] Setting --prune_distances=1 I0718 12:44:03.782856 3000 DependencyOptions.cpp:169] Setting --prune_basic=1 I0718 12:44:03.783113 3000 DependencyOptions.cpp:172] Setting --pruner_posterior_threshold=0.0001 I0718 12:44:03.783380 3000 DependencyOptions.cpp:176] Setting --pruner_max_heads=10 I0718 12:44:03.783640 3000 DependencyOptions.cpp:242] Arc factored parts enabled. I0718 12:44:03.783830 3000 DependencyOptions.cpp:245] Consecutive sibling parts enabled. I0718 12:44:03.783978 3000 DependencyOptions.cpp:248] Grandparent parts enabled. I0718 12:44:03.784241 3000 DependencyOptions.cpp:257] Arbitrary sibling parts enabled. I0718 12:44:03.784446 3000 DependencyOptions.cpp:266] Head bigram parts enabled. I0718 12:44:03.784612 3000 DependencyOptions.cpp:251] Grandsibling parts enabled. I0718 12:44:03.784874 3000 DependencyOptions.cpp:254] Trisibling parts enabled.

and it stopped here, no output, no errors (except the one at the beggining), I installed nltk, and updated the .config . any recomondations, thanks

AhmadSawalhah avatar Jul 18 '17 09:07 AhmadSawalhah

Regarding the last Issue, It is not stopped, I installed PyCharm and debugged the code. but it takes very long time ( more than 4hrs) for one statement. How to speed up the service,I need to apply it on many documents, each document many sentences, thanks @davidalbertonogueira

AhmadSawalhah avatar Jul 22 '17 06:07 AhmadSawalhah