Examples of ParsedData


Examples of seekfeel.utilities.stanfordwrapper.ParsedData

            words.add(t.getWord());
        }
    }
    public ArrayList<String> extractAspects(Review r) throws IOException
    {
        ParsedData parsedData = new ParsedData();
        boolean skipReview = false;
       // ArrayList<ArrayList<String>> cleanSentences = pr.process(r, dp.textpro);
        do
        {
            Lexicons.reviewTargets.clear();
            Lexicons.reviewOpinions.clear();
            int sentenceNum = r.Review_Sentences.size();
            try
            {
                for(int j =0; j < r.formatedSentences.size(); j++)
                {
                    Formatted_Text sentence = r.formatedSentences.get(j);
                    ArrayList<DependencyRelation> depRelation = sentence.getTextDependencyRelations();
                    setWordsPos(sentence);
                    parsedData.setDependencyRelations(depRelation);
                    parsedData.setTaggedWords(posTags);
                    dp.setParsedData(parsedData);
                    dp.extractTargets(words);
                    posTags.clear();
                    words.clear();
                }
                updateDictionary();
                for(int j =0; j < r.formatedSentences.size(); j++)
                {
                    Formatted_Text sentence = r.formatedSentences.get(j);
                    ArrayList<DependencyRelation> depRelation = sentence.getTextDependencyRelations();
                    setWordsPos(sentence);
                    parsedData.setDependencyRelations(depRelation);
                    parsedData.setTaggedWords(posTags);
                    dp.setParsedData(parsedData);
                    dp.partWholeRel(words);
                     posTags.clear();
                    words.clear();
                }
                updateDictionary();
            }
            catch(Exception e)
            {
                skipReview = true;
                continue;
            }
            Lexicons.reviewTargets.clear();
            Lexicons.reviewOpinions.clear();
            try
            {
                //ArrayList<ArrayList<String>> cleanSentences  = pr.process(r, dp.textpro);
                for(int j =0; j < r.formatedSentences.size(); j++)
                {
                    Formatted_Text sentence = r.formatedSentences.get(j);
                    ArrayList<DependencyRelation> depRelation = sentence.getTextDependencyRelations();
                    setWordsPos(sentence);
                    parsedData.setDependencyRelations(depRelation);
                    parsedData.setTaggedWords(posTags);
                    dp.setParsedData(parsedData);
                    dp.expandLexicon(words);
                    posTags.clear();
                    words.clear();
                }
View Full Code Here

Examples of seekfeel.utilities.stanfordwrapper.ParsedData

                Lexicons.fillPossesiveWords();
  }
        public void initialize()
        {
            loadDictionaries();
      parsedData  = new ParsedData();        // create ParsedData object
            textpro = new JtextWrap();
            textpro.initialize();
        }
View Full Code Here

Examples of seekfeel.utilities.stanfordwrapper.ParsedData

        private ParsedData parse(ArrayList<Word> words)
        {
            ParsingOptions opts = new ParsingOptions();
            opts.setPosTag(true);
            opts.setParseRelations(true);
            ParsedData resultData = stParser.parse(words, opts);
            return resultData;

        }
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    seeBallIn(1.0, 1.0, 0.0);
  }


  private void seeBallIn(double x, double y, double z){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(FixedObject.OUR_LOWER_CORNER, FixedObject.OUR_LOWER_CORNER.getAbsolutePosition().rotateOverZ(-PI / 2.0));
    data.fixedObjects.put(FixedObject.OUR_UPPER_POST, FixedObject.OUR_UPPER_POST.getAbsolutePosition().rotateOverZ(-PI / 2.0));
    data.fixedObjects.put(FixedObject.OUR_LOWER_POST, FixedObject.OUR_LOWER_POST.getAbsolutePosition().rotateOverZ(-PI / 2.0));
   
    data.ballRelativePosition = Vector3D.cartesian(x, y, z);
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertThat(message, containsString("(he1 8"));
  }

  @Test
  public void shouldReflectChangesInAgentModel(){
    ParsedData parsed = new ParsedData();
    parsed.agentsJoints = Collections.singletonMap(Joint.HE1, 20.0);
    me.processNewServerMessage(parsed);

    Phase phase = createDummyPhase();
    JointPlacement.calculateNewTargetState(phase);
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

  private ParsedData newData;

  @Before
  public void setup(){
    kalman = new KalmanAdjuster();
    data = new ParsedData();
    data.SIMULATION_TIME = 100.0;
    newData = new ParsedData();
    newData.SIMULATION_TIME = 100.0;
  }
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertCorrectRotations(PI / 2.0, 0.0, 3.0*PI/2.0);
    assertCorrectRotations(PI / 2.0, PI, 3.0*PI/2.0);
  }

  private void assertCorrectRotations(double rotationX, double rotationY, double rotationZ){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(THEIR_UPPER_CORNER,
      THEIR_UPPER_CORNER.getAbsolutePosition().rotateOverZ(-rotationZ).rotateOverY(-rotationY).rotateOverX(-rotationX));
    data.fixedObjects.put(THEIR_LOWER_CORNER,
      THEIR_LOWER_CORNER.getAbsolutePosition().rotateOverZ(-rotationZ).rotateOverY(-rotationY).rotateOverX(-rotationX));
    data.fixedObjects.put(THEIR_UPPER_POST,
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

  }
 
  @Test
  public void gyroscope(){
    //initial rotation = 0.0, 0.0, 3*PI / 2.0
    ParsedData gyro = new ParsedData();
    assertRotationChanged(gyro, 180.0 / 20.0, 0, 180.0 / 20.0);
  }
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertPosition(Vector3D.cartesian(-1.0, 0.0, 0.0), 3.0*PI / 2.0);
    assertPosition(Vector3D.cartesian(1.0, 0.0, 0.0), 3.0*PI / 2.0);
  }

  private void assertPosition(Vector3D ourPosition, double rotationZ){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(THEIR_UPPER_CORNER, THEIR_UPPER_CORNER.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    data.fixedObjects.put(THEIR_LOWER_CORNER, THEIR_LOWER_CORNER.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    data.fixedObjects.put(THEIR_LOWER_POST, THEIR_LOWER_POST.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    model.processNewServerMessage(data);
   
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertThat(getDefensivePosition(), is(equalTo(Vector3D.cartesian(-7.5, 0.0, 0.0))));
  }

  private void positionMyTeammateCloserToTheBall(Vector3D ball) {
    me.setPosition(Vector3D.cartesian(-2.0, 2.0, 0.0));
    ParsedData data = new ParsedData();
    data.ballRelativePosition = me.relativize(ball);
    data.teammates.put(2, Collections.singletonMap("head", Vector3D.cartesian(1.0, 1.0, 0.0)));
    model.processNewServerMessage(data);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.