Only learn from confirmed items

Text classification should only learn from confirmed items. Log if
classification is disabled when processing an item.
This commit is contained in:
Eike Kettner
2020-09-07 13:04:40 +02:00
parent cb1a9e0699
commit 76ccfb8a81
4 changed files with 24 additions and 9 deletions

View File

@ -23,6 +23,11 @@ object ItemState {
case object Created extends ItemState
case object Confirmed extends ItemState
def premature: ItemState = Premature
def processing: ItemState = Processing
def created: ItemState = Created
def confirmed: ItemState = Confirmed
def fromString(str: String): Either[String, ItemState] =
str.toLowerCase match {
case "premature" => Right(Premature)