Created
November 21, 2014 01:23
-
-
Save ferromir/91b0f679574914c2825b 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
val payload = """ | |
{ | |
aug_weights: { | |
interest: 0.20, | |
impact: 0.0, | |
emotion: 0.10, | |
opinion: 0.0 | |
}, | |
terms_and_weights: [ | |
{ | |
syn_terms: [foo, bar, baz], | |
weight: 0.50 | |
}, | |
{ | |
syn_terms: [ what's, up ], | |
weight: 0.20 | |
} | |
] | |
} | |
""" | |
case class AugWeigths( | |
interest: Double, | |
impact: Double, | |
emotion: Double, | |
opinion: Double) | |
case class TermsWeigth( | |
syn_terms: List[String], | |
weight: Double) | |
case class Weights( | |
aug_weigths: AugWeigths, | |
terms_and_weights: List[TermsWeigth]) | |
// Directive to use in V1Service: | |
entity(Weights) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment