public class RemoveEnglishStopWordsPostProcessor extends Object implements IntentPostProcessor
any
entities.
If a processed parameter value result in an empty String the initial value is preserved, assuming that the entity is supposed to match stop words.
This post-processor uses the list of English stop words collected by the community on Github.
Constructor and Description |
---|
RemoveEnglishStopWordsPostProcessor()
Loads the stop words
List . |
Modifier and Type | Method and Description |
---|---|
com.xatkit.intent.RecognizedIntent |
process(com.xatkit.intent.RecognizedIntent recognizedIntent,
XatkitSession session)
Removes the English stop words from the
recognizedIntent 's parameter values extracted from any
entities. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
public RemoveEnglishStopWordsPostProcessor()
List
.
If an error occurred while loading the stop words an error message is logged, but no exception is thrown. This processor won't be able to remove stop words but it should not prevent Xatkit to start.
public com.xatkit.intent.RecognizedIntent process(com.xatkit.intent.RecognizedIntent recognizedIntent, XatkitSession session)
recognizedIntent
's parameter values extracted from any
entities.
If a processed parameter value result in an empty String the initial value is preserved, assuming that the entity is supposed to match stop words.
process
in interface IntentPostProcessor
recognizedIntent
- the RecognizedIntent
to processsession
- the XatkitSession
associated to the recognizedIntent
recognizedIntent
Copyright © 2020 SOM Research Lab. All rights reserved.