Sha256: 2a1cedccc3df65c722f3826b486e123bf3d62ea669a15304c1469270b3dade15
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 Bytes
Contents
require "spec_helper" describe OpenNlp::Model::POSTagger do subject { OpenNlp::Model::POSTagger } let(:model_file_name) { File.join(FIXTURES_DIR, "en-pos-maxent.bin") } it "should accept a string filename parameter" do model = subject.new(model_file_name) model.should be_a(subject) model.j_model.should be_a(subject.java_class_name) end it "should accept a java.io.FileInputStream object" do file_input_stream = java.io.FileInputStream.new(model_file_name) model = subject.new(file_input_stream) model.should be_a(subject) model.j_model.should be_a(subject.java_class_name) end it "should raise an argument error otherwise" do lambda { subject.new(nil) }.should raise_error(ArgumentError) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
open_nlp-0.0.2-java | spec/model/pos_tagger_spec.rb |
open_nlp-0.0.1-java | spec/model/pos_tagger_spec.rb |