pharo-ai / NgramModel

Ngram language model implemented in Pharo
MIT License
4 stars 4 forks source link

16-Fails-to-parse-n-grams-when-reading-from-file-if-n-grams-contain-commas #20

Closed myroslavarm closed 4 years ago

myroslavarm commented 4 years ago

intermediate fix for #16

olekscode commented 4 years ago

This is just a way of silencing an exception. The bug is still there:

What happened before (we expect to get a trigram and a count):

hello , world,42
n-gram(hello), 'world' asNumber ==> ERROR

What happens now:

n-gram(hello), '42' asNumber ==> OK

So it's actually worse Because we get wrong result and no error message

What we need:

n-gram(hello , world), '42' asNumber ==> OK
myroslavarm commented 4 years ago

This was just a way of providing an intermediate fix until the proper fix is introduced...