com.johnsnowlabs.nlp.annotators.context
ContextualFilteringRules
Companion object ContextualFilteringRules
case class ContextualFilteringRules(entity: String, scopeWindowLevel: String, whiteListEntities: Option[Array[String]], blackListEntities: Option[Array[String]], scopeWindow: (Int, Int), blackListWords: Option[Array[String]], whiteListWords: Option[Array[String]], confidenceThreshold: Option[Double], possibleRegexContext: Option[String], impossibleRegexContext: Option[String]) extends Serializable with Product
ContextualFilteringRules is a case class that represents the rules to filter the Chunks.
- entity
The field of the entity to filter.
- scopeWindowLevel
The level of the scope window. It can be either 'token' or 'chunk'.
- whiteListEntities
The white list entities to filter.One element of the white list is enough to keep the chunk.
- blackListEntities
The black list entities to filter.All elements of the black list must be absent to keep the chunk.
- scopeWindow
The scope window considering chunks to filter. Scope can be calculated looking at tokens or chunks.Decision of chunk or token can be defined by scopeWindowLevel.
- blackListWords
The black list words to filter. All elements of the black list must be absent to keep the chunk.
- whiteListWords
The white list words to filter. One element of the white list is enough to keep the chunk.
- confidenceThreshold
The confidence threshold to filter the chunks. Filtering is only applied if the confidence of the chunk is below the threshold.
- possibleRegexContext
The possible regex context to filter the chunks. If the regex is found in the context(chunk), the chunk is kept.
- impossibleRegexContext
The impossible regex context to filter the chunks. If the regex is found in the context(chunk), the chunk is removed.
- Alphabetic
- By Inheritance
- ContextualFilteringRules
- Product
- Equals
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ContextualFilteringRules(entity: String, scopeWindowLevel: String, whiteListEntities: Option[Array[String]], blackListEntities: Option[Array[String]], scopeWindow: (Int, Int), blackListWords: Option[Array[String]], whiteListWords: Option[Array[String]], confidenceThreshold: Option[Double], possibleRegexContext: Option[String], impossibleRegexContext: Option[String])
- entity
The field of the entity to filter.
- scopeWindowLevel
The level of the scope window. It can be either 'token' or 'chunk'.
- whiteListEntities
The white list entities to filter.One element of the white list is enough to keep the chunk.
- blackListEntities
The black list entities to filter.All elements of the black list must be absent to keep the chunk.
- scopeWindow
The scope window considering chunks to filter. Scope can be calculated looking at tokens or chunks.Decision of chunk or token can be defined by scopeWindowLevel.
- blackListWords
The black list words to filter. All elements of the black list must be absent to keep the chunk.
- whiteListWords
The white list words to filter. One element of the white list is enough to keep the chunk.
- confidenceThreshold
The confidence threshold to filter the chunks. Filtering is only applied if the confidence of the chunk is below the threshold.
- possibleRegexContext
The possible regex context to filter the chunks. If the regex is found in the context(chunk), the chunk is kept.
- impossibleRegexContext
The impossible regex context to filter the chunks. If the regex is found in the context(chunk), the chunk is removed.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val blackListEntities: Option[Array[String]]
- val blackListWords: Option[Array[String]]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val confidenceThreshold: Option[Double]
- val entity: String
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val impossibleRegexContext: Option[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val possibleRegexContext: Option[String]
- val scopeWindow: (Int, Int)
- val scopeWindowLevel: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val whiteListEntities: Option[Array[String]]
- val whiteListWords: Option[Array[String]]