Examples of Lexicon


Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 6 to match simplenlg tutorial version 4' code
   */
  @Test
  public void testSection6A( ) {
    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 section 7 code
   */
  @Test
    public void testSection7( ) {
      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 section 8 code
   */
  @Test
    public void testSection8( ) {
      Lexicon lexicon = Lexicon.getDefaultLexicon( ) ;      // default simplenlg lexicon
      NLGFactory nlgFactory = new NLGFactory( lexicon ) // factory based on lexicon
      Realiser realiser = new Realiser( lexicon ) ;
     
      NPPhraseSpec subject = nlgFactory.createNounPhrase( "Mary" ) ;
      NPPhraseSpec object = nlgFactory.createNounPhrase( "the monkey" ) ;

Examples of simplenlg.lexicon.Lexicon

  /**
   * test section 10 code
   */
  @Test
    public void testSection10( ) {
      Lexicon lexicon = Lexicon.getDefaultLexicon( ) ;      // default simplenlg lexicon
      NLGFactory nlgFactory = new NLGFactory( lexicon ) // factory based on lexicon
      Realiser realiser = new Realiser( lexicon ) ;
     
      NPPhraseSpec subject1 = nlgFactory.createNounPhrase( "Mary" ) ;
      NPPhraseSpec subject2 = nlgFactory.createNounPhrase( "your", "giraffe" ) ;

Examples of simplenlg.lexicon.Lexicon

   * test section 11 code
   */
  @SuppressWarnings({ "deprecation" })
  @Test
  public void testSection11( ) {
    Lexicon lexicon = Lexicon.getDefaultLexicon( ) ;     // default simplenlg lexicon
    NLGFactory nlgFactory = new NLGFactory( lexicon ) // factory based on lexicon

    Realiser realiser = new Realiser( lexicon ) ;
   
    SPhraseSpec pA = nlgFactory.createClause( "Mary", "chase", "the monkey" ) ;

Examples of simplenlg.lexicon.Lexicon

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

    Realiser realiser = new Realiser( lexicon ) ;
 
    SPhraseSpec s1 = nlgFactory.createClause( "my cat",   "like", "fish"  ) ;

Examples of simplenlg.lexicon.Lexicon

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

    Realiser realiser = new Realiser( lexicon ) ;
 
    SPhraseSpec p1 = nlgFactory.createClause( "Mary", "chase", "the monkey" ) ;
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.