-
Notifications
You must be signed in to change notification settings - Fork 128
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
unable to parse #74
Comments
Can you try |
apparently jdk is needed and all kinds of java stuff which were not mentioned anywhere in the installing or the dependency list. So basically, the issue is missing rjb and JAVA_HOME environment variable. install ruby + gem [rubyinstaller for windows, install the devKit as well] - this part is already done after this the missing stanfrod error stopped showing up, porter_stemmer.c:303:14: warning: passing argument 2 of 'ends' discards qualifie and tryig this code: require 'treat' include Treat::Core::DSL sect = section "A walk in the park\n"+ sect.do(:chunk, :segment, :parse) resolved with: system cannot find the path specified) (FileNotFoundException) so there is still an issue (understand it?), and there is some mentioning of the jdk I think should be added to the manual. |
Looks like the gem is trying to find the bind-it log file, and failing (see here). I don't have a Windows box to repro, but the following should fix it:
You need to place this before you require Treat or anything else. |
where should I write that? in a BindIt file (can't find a readable one?) because otherwise : |
You need to require 'bind-it' first. Sorry, should've made that clearer. Sent from my iPhone
|
well although I guess I am doing something not exactly right again, I tried all that I had in mind, the two rows have something not right. require 'bind-it' C:/Users/owner/Desktop/Question.rb:2:in are you sure what you suggest is possible, I am not experienced with ruby, but log_file is not a child, |
How about this? class BindIt::JarLoader
def self.set_java_logging
end
end |
it does something, just the same thing that changing the file itself did (the bindit file in the gems, I tried commenting out line 46) require 'bind-it' require 'treat' sect = section "A walk in the park\n"+ sect.do(:chunk, :segment, :parse) Loading parser from serialized file C:/Ruby193/lib/ruby/gems/1.9.1/gems/treat-2.0.7/models/stanford/grammar/englishPCFG.ser.gz ... done [1.0 sec]. |
ok the zero issue was already the code, it is finally working. Think there can be something permanent to fix that (for example commenting out line 46, or is it important for linux users or something?). |
@borgr, I'm running into the zero length error as well. What did you do to get past that? |
tokenize before parsing |
hello,
I have been trying to install and use treat, but when I try parsing, I get the following error:
irb(main):008:0> s = sentence('this is another test').parse
'LoadError: cannot load such file -- stanford-core-nlp
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n
require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i n
require'from C:/Ruby193/lib/ruby/gems/1.9.1/gems/treat-2.0.7/lib/treat/loaders/s
tanford.rb:7:in
load' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/treat-2.0.7/lib/treat/workers/p rocessors/parsers/stanford.rb:24:in
parse'from C:/Ruby193/lib/ruby/gems/1.9.1/gems/treat-2.0.7/lib/treat/entities/
entity/delegatable.rb:66:in
call_worker' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/treat-2.0.7/lib/treat/entities/ entity/delegatable.rb:40:in
block (2 levels) in add_workers'from (irb):8
from C:/Ruby193/bin/irb:12:in `
I have also tried to reinstall the english package which finished but also written many errors among them:
c:/users/owner/devkitruby/mingw/bin/../lib/gcc/mingw32/4.5.2/libstdc++.dll.a(d00
3873.o):(.text+0x0): first defined here
c:/users/owner/devkitruby/mingw/bin/../lib/gcc/mingw32/4.5.2\libstdc++.a(eh_thro
w.o):eh_throw.cc:(.text+0xd0): multiple definition of
__cxa_rethrow' c:/users/owner/devkitruby/mingw/bin/../lib/gcc/mingw32/4.5.2/libstdc++.dll.a(d00 3883.o):(.text+0x0): first defined here c:/users/owner/devkitruby/mingw/bin/../lib/gcc/mingw32/4.5.2\libstdc++.a(eh_pers onality.o):eh_personality.cc:(.text+0x34c): multiple definition of
__gxx_personality_sj0'
c:/users/owner/devkitruby/mingw/bin/../lib/gcc/mingw32/4.5.2/libstdc++.dll.a(d00
3897.o):(.text+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [word_tagger.so] Error 1
any idea what am I doing wrong? or what is the problem?
thank you in advance
The text was updated successfully, but these errors were encountered: