Error in Keyword Based Classifier

I am trying out MachineLearningExtractor package.
While using Keyword Based Classifier activity, I am getting following error

-
Message: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Collections.Generic.IList`1[UiPath.SmartData.DocumentClassification.Learning.KeywordLearning.ClassificationInformation]’ because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
Please help to get it resolved.

1 Like

Hey,
It seems that you have an invalid learning JSON.
When first using the Keyword Based Classifier, you should start with an empty JSON file, something like [] (basically, just create a text file with just [] in it and make sure the file extension is .json).
Then, you can use the Keyword Based Classifier inside a Train Classifiers Scope to add to the empty JSON relevant information based on the output of the Validation Station.
More info on how to use the Keyword Based Classifier here: https://activities.uipath.com/lang-en/docs/keyword-based-classifier .

1 Like

Hello @Harshita2 - try the sample worflow from here:

Please make sure you comment out the data extraction scope - the sample also uses multiple extractors for data extraction - and focus on the Classify and Train Classifiers part to understand the setup.

Hope it helps!