Package com.linguamathematica.oa4j.Analysis

Examples of com.linguamathematica.oa4j.Analysis.PolarityResult


  protected static TopicsAnalysis.Noun properNoun(final Result<String> topic, final Result<Polarity> polarity,
      final Result<OfferingGuidance> offeringGuidance, final Result<RequestingGuidance> RequestingGuidance,
      final NER ner)
  {
    return new Noun(topic, new PolarityResult(polarity, polarity, polarity), offeringGuidance, RequestingGuidance,
        ner);
  }
View Full Code Here


      final Result<Polarity> max, final Result<OfferingGuidance> guidanceOffer,
      final Result<RequestingGuidance> guidanceRequest, final Result<Decisiveness> decisiveness,
      final Result<Slang> slang, final Result<Flamboyance> flamboyance, final Result<Contrast> contrast,
      final Result<Temporality> temporality)
  {
    return new StylesAnalysis(new PolarityResult(min, mean, max), guidanceOffer, guidanceRequest, decisiveness,
        slang, flamboyance, contrast, newSet(temporality));
  }
View Full Code Here

  @Test
  public void returns_CorrectTopTopics() throws Exception
  {
    final Set<Noun> expected = newSet(//@formatter:off

        topTopic(topic("widow", 12), new PolarityResult(of(Polarity.NEUTRAL, 0),of(Polarity.POSITIVE, .92),of(Polarity.POSITIVE, .95)),
            of(OfferingGuidance.TO_SOME_EXTENT, 2),of(RequestingGuidance.NOT_AT_ALL, 1)),

        topTopic(topic("Judge Thatcher", 12), of(Polarity.NEUTRAL, 0),
            of(OfferingGuidance.TO_SOME_EXTENT, 2),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "female")),

        topTopic(topic("Tom Sawyer", 9), of(Polarity.NEUTRAL, 0),
            of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "male")),

        topTopic(topic("Tom", 7), of(Polarity.NEUTRAL, 0),
            of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1), ner("Person", "male")),

        topTopic(topic("money", 6),new PolarityResult(of(Polarity.NEGATIVE, -.89),of(Polarity.NEGATIVE, -.89),of(Polarity.NEUTRAL, 0)),
            of(OfferingGuidance.NOT_AT_ALL, 1),of(RequestingGuidance.NOT_AT_ALL, 1)));//@formatter:on

    assertThat(topTopicsIn(textA), are(as(expected)));
  }
View Full Code Here

TOP

Related Classes of com.linguamathematica.oa4j.Analysis.PolarityResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.