-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi All,
I am trying to get some very basic tokenization to work. I think I am not using the API properly because the method Tokenize is throwing System.NullReferenceException. Any suggestions?
My code
using CH = global::CherubNLP.Tokenize;
public string[] MyTokenize(string sentence)
{
var options = new CH.TokenizationOptions
{
};
var tokenizer = new CH.TokenizerFactory(
options,
global::CherubNLP.SupportedLanguage.English);
var tokens = tokenizer.Tokenize(sentence);
string[] results = tokens.
Where(tk=>tk.IsAlpha==true).
Select(tk => tk.Text).ToArray();
return results;
}
Thank you,
Sau
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels