Skip to content

Instantly share code, notes, and snippets.

@ferromir
Created November 21, 2014 01:23
Show Gist options
  • Save ferromir/91b0f679574914c2825b to your computer and use it in GitHub Desktop.
Save ferromir/91b0f679574914c2825b to your computer and use it in GitHub Desktop.
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