You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
Thank you,
Sau
The text was updated successfully, but these errors were encountered: