Examples of Lexicon


Examples of net.sourceforge.chaperon.model.lexicon.Lexicon

          throw new ProcessingException("Source '"+this.lexiconSource.getURI()+"' not found");

        LexiconFactory factory = new LexiconFactory();
        SourceUtil.toSAX(this.manager, this.lexiconSource, null, factory);

        Lexicon lexicon = factory.getLexicon();

        LexicalAutomatonBuilder builder =
          new LexicalAutomatonBuilder(lexicon/*, new AvalonLogger(this.logger)*/);

        this.automaton = builder.getLexicalAutomaton();

Examples of net.sourceforge.chaperon.model.lexicon.Lexicon

                                                  "' not found");
                }
                SourceUtil.toSAX(this.manager, this.lexiconSource, null, confighandler);

                Configuration config = confighandler.getConfiguration();
                Lexicon lexicon = LexiconFactory.createLexicon(config);

                LexicalAutomatonBuilder builder = new LexicalAutomatonBuilder(lexicon,
                                                      this.logger);

                this.automaton = builder.getLexicalAutomaton();

Examples of net.sourceforge.chaperon.model.lexicon.Lexicon

                                                  "' not found");
                }
                SourceUtil.toSAX(this.manager, this.lexiconSource, null, confighandler);

                Configuration config = confighandler.getConfiguration();
                Lexicon lexicon = LexiconFactory.createLexicon(config);

                LexicalAutomatonBuilder builder = new LexicalAutomatonBuilder(lexicon,
                                                      this.logger);

                this.automaton = builder.getLexicalAutomaton();

Examples of net.sourceforge.chaperon.model.lexicon.Lexicon

                                                  "' not found");
                }
                SourceUtil.toSAX(this.manager, this.lexiconSource, null, confighandler);

                Configuration config = confighandler.getConfiguration();
                Lexicon lexicon = LexiconFactory.createLexicon(config);

                LexicalAutomatonBuilder builder = new LexicalAutomatonBuilder(lexicon,
                                                      this.logger);

                this.automaton = builder.getLexicalAutomaton();

Examples of simplenlg.lexicon.Lexicon

    // below is a simple complete example of using simplenlg V4
    // afterwards is an example of using simplenlg just for morphology
   
    // set up
    Lexicon lexicon = new XMLLexicon();                          // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory(lexicon);             // factory based on lexicon

    // create sentences
    //   "John did not go to the bigger park. He played football there."
    NPPhraseSpec thePark = nlgFactory.createNounPhrase("the", "park");   // create an NP

Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 3 code
   */
  @Test
  public void testSection3() {
    Lexicon lexicon = Lexicon.getDefaultLexicon();                         // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory(lexicon);             // factory based on lexicon

    NLGElement s1 = nlgFactory.createSentence("my dog is happy");
   
    Realiser r = new Realiser(lexicon);

Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 5 code
   */
  @Test
  public void testSection5() {
    Lexicon lexicon = Lexicon.getDefaultLexicon();                         // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory(lexicon);             // factory based on lexicon
    Realiser realiser = new Realiser(lexicon);
   
    SPhraseSpec p = nlgFactory.createClause();
    p.setSubject("my dog");

Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 6 code
   */
  @Test
  public void testSection6() {
    Lexicon lexicon = Lexicon.getDefaultLexicon();                         // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory(lexicon);             // factory based on lexicon
    Realiser realiser = new Realiser(lexicon);
   
    SPhraseSpec p = nlgFactory.createClause();
    p.setSubject("Mary");

Examples of simplenlg.lexicon.Lexicon

  /**
   * test ability to use variant words
   */
  @Test
  public void testVariants() {
    Lexicon lexicon = Lexicon.getDefaultLexicon();                         // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory(lexicon);             // factory based on lexicon
    Realiser realiser = new Realiser(lexicon);
   
    SPhraseSpec p = nlgFactory.createClause();
    p.setSubject("my dog");

Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 5 to match simplenlg tutorial version 4's code
   */
  @Test
    public void testSection5A( ) {
      Lexicon lexicon = Lexicon.getDefaultLexicon( ) ;      // default simplenlg lexicon
      NLGFactory nlgFactory = new NLGFactory( lexicon ) // factory based on lexicon
      Realiser realiser = new Realiser( lexicon ) ;
     
      SPhraseSpec p = nlgFactory.createClause( ) ;
      p.setSubject( "Mary" ) ;
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.