ThoughtLeadr/spotlight-client — pull request #2 by ryb (2012-03-07 20:56:11+00:00)
Title: Candidates

`candidates :: Client -> String -> IO (Either String SpotlightCandidatesResponse)` for the endpoints that support it. Example:

candidates client "Previously, applicants were asked to surrender their user name and password, but a complaint from the ACLU stopped that practice last year. While submitting to a Facebook review is voluntary, virtually all applicants agree to it out of a desire to score well in the interview, according Maryland ACLU legislative director Melissa Coretz Goemann."

And you get something like this (the result is super-long and snipped here):

Right
[SpotlightCandidates{candidateSurfaceForm = "review",
candidateOffset = 171,
candidateEntities =
[CandidateEntity{candidateLabel = "Review",
candidateURI = "Review", candidateContextualScore = 0.0,
candidatePercentageOfSecondRank = 0.3285025069153987,
candidateSupport = 371, candidatePriorScore = 0.0,
candidateFinalScore = 0.16194786131381989},
CandidateEntity{candidateLabel = "Adventist Review",
candidateURI = "Adventist_Review",
candidateContextualScore = 0.0,
candidatePercentageOfSecondRank = 0.6449879247307634,
candidateSupport = 66, candidatePriorScore = 0.0,
candidateFinalScore = 5.320027843117714e-2},

CandidateEntity{candidateLabel = "Review (magazine)",
candidateURI = "Review_%28magazine%29",
candidateContextualScore = 0.0,
candidatePercentageOfSecondRank = -1.0,
candidateSupport = 11, candidatePriorScore = 0.0,
candidateFinalScore = 5.652599036693573e-3}]},
SpotlightCandidates{candidateSurfaceForm = "legislative director",
candidateOffset = 301,
candidateEntities =
[CandidateEntity{candidateLabel = "Legislative assistant",
candidateURI = "Legislative_assistant",
candidateContextualScore = 0.0,
candidatePercentageOfSecondRank = -1.0,
candidateSupport = 31, candidatePriorScore = 0.0,
candidateFinalScore = 9.554968774318695e-2}]},
SpotlightCandidates{candidateSurfaceForm = "asked",
candidateOffset = 28,
candidateEntities =
[CandidateEntity{candidateLabel = "Question",
candidateURI = "Question",
candidateContextualScore = 0.0,
candidatePercentageOfSecondRank = -1.0,
candidateSupport = 148, candidatePriorScore = 0.0,
candidateFinalScore = 8.22213888168335e-2}]}

]}]