Handle edge-case corpuses with short sentences
This commit is contained in:
parent
dbae6d3499
commit
a272bd69ca
3 changed files with 18 additions and 4 deletions
|
@ -70,5 +70,19 @@ describe Ebooks::Model do
|
|||
|
||||
file.unlink
|
||||
end
|
||||
|
||||
it 'handles strange unicode edge-cases' do
|
||||
file = Tempfile.new('unicode')
|
||||
file.write("💞\n💞")
|
||||
file.close
|
||||
|
||||
model = Ebooks::Model.consume(file.path)
|
||||
expect(model.mentions.count).to eq 0
|
||||
expect(model.sentences.count).to eq 2
|
||||
|
||||
file.unlink
|
||||
|
||||
p model.make_statement
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue