You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice job dude. I want to proccess a raw string input, not from pdf or txt file. And I find some related code from AnyStyle and wapiti-ruby source code, but it didn`t work. Can u give me an example?
require'anystyle'# `str` is the full text of pdfstr="xxx"finder=AnyStyle.finderdataset=Wapiti::Dataset.prepare(str)output=finder.model.labeldatasetresult=Wapiti::Dataset.new(dataset.map.with_index{ |doc,idx|
doc.label(output[idx])})printresult[0].references
it case some bugs like:
Traceback (most recent call last):
2: from parser_string.rb:1102:in `<main>'
1: from /Library/Ruby/Gems/2.6.0/gems/wapiti-1.0.7/lib/wapiti/model.rb:44:in `label'
/Library/Ruby/Gems/2.6.0/gems/wapiti-1.0.7/lib/wapiti/model.rb:44:in `label': missing tokens at 1: 11/8, cannot apply pattern (Wapiti::NativeError)
The text was updated successfully, but these errors were encountered:
You can use AnyStyle::Document which is a wrapper around the Wapiti classes aimed for use with the Finder model. For an example, take a look at the Document.open which can open plain text files.
You can use AnyStyle::Document which is a wrapper around the Wapiti classes aimed for use with the Finder model. For an example, take a look at the Document.open which can open plain text files.
Nice job dude. I want to proccess a raw string input, not from pdf or txt file. And I find some related code from AnyStyle and wapiti-ruby source code, but it didn`t work. Can u give me an example?
it case some bugs like:
The text was updated successfully, but these errors were encountered: