doc, err := prose.NewDocument(data, prose.WithExtraction(false), prose.WithTagging(false), prose.WithSegmentation(false))
if err != nil {
return nil
}
tokens := make([]string, 0)
for _, t := range doc.Tokens() {
tokens = append(tokens, t.Text)
}
return tokens
I'm surprised by the following input / result:
amount($)becomes{"amount($", ")}Size (Men's):9.5becomes{"Size", "(", "Men"}Instead I would expect:
amount($)becomes{"amount", "(", "$", ")"}Size (Men's):9.5becomes{"Size", "(", "Men", ")", ":", "9.5"}or{"Size", "(", "Men", "'s", ")", ":", "9.5"}Here's the sample I'm running: