Created
January 5, 2017 21:56
-
-
Save zeryx/af9b3edca4e303346acc6097846445df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package algorithmia.TechSupport | |
import algorithmia.TechSupport.Classes.DataPoint | |
import argonaut.Argonaut._ | |
import argonaut.CodecJson | |
/** | |
* Created by james on 05/01/17. | |
*/ | |
sealed trait Input | |
case class Training(labelData: Option[List[DataPoint]], labelFile: Option[String], namespace: Option[String]) extends Input | |
case class Predict(text: String, namespace: Option[String]) extends Input | |
object Training{ | |
implicit def TrainingCodec: CodecJson[Training] = | |
casecodec3(Training.apply, Training.unapply)( | |
"labelData", | |
"labelFile", | |
"namespace" | |
) | |
} | |
object Predict{ | |
implicit def PredictCodec: CodecJson[Predict] = | |
casecodec2(Predict.apply, Predict.unapply)( | |
"text", | |
"namespace" | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment