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

Install on Windows 10 #36

Open
AhmadSawalhah opened this issue Jul 8, 2017 · 10 comments
Open

Install on Windows 10 #36

AhmadSawalhah opened this issue Jul 8, 2017 · 10 comments

Comments

@AhmadSawalhah
Copy link

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

@davidalbertonogueira
Copy link
Contributor

davidalbertonogueira commented Jul 8, 2017 via email

@AhmadSawalhah
Copy link
Author

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

@AhmadSawalhah
Copy link
Author

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

@davidalbertonogueira
Copy link
Contributor

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.

@AhmadSawalhah
Copy link
Author

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?

@davidalbertonogueira
Copy link
Contributor

You need to add gflags to the LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/deps/local/lib:

@AhmadSawalhah
Copy link
Author

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

@davidalbertonogueira
Copy link
Contributor

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

@AhmadSawalhah
Copy link
Author

AhmadSawalhah commented Jul 18, 2017

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
Copy link
Author

AhmadSawalhah commented Jul 22, 2017

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

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