Skip to content

"I" is not accepted as subject in MATLAB #20

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Set classpath.txt in Matlab
2. Use following code
   import simplenlg.framework.*
   import simplenlg.lexicon.*
   import simplenlg.realiser.english.*
   import simplenlg.phrasespec.*
   import simplenlg.features.*
   lexicon = Lexicon.getDefaultLexicon();
   nlgFactory = NLGFactory(lexicon);
   realiser = Realiser(lexicon);
   p = nlgFactory.createClause('I', 'be', 'happy')
   output4 = realiser.realiseSentence(p)
3.

What is the expected output? What do you see instead?
I get "I am Happy." as output in Java. But Matlab gives following error.
??? Java exception occurred:
java.lang.IllegalArgumentException: I is not a valid type

    at simplenlg.framework.NLGFactory.createNLGElement(NLGFactory.java:448)

    at simplenlg.framework.NLGFactory.createNounPhrase(NLGFactory.java:513)

    at simplenlg.framework.NLGFactory.createNounPhrase(NLGFactory.java:496)

    at simplenlg.phrasespec.SPhraseSpec.setSubject(SPhraseSpec.java:294)

    at simplenlg.framework.NLGFactory.createClause(NLGFactory.java:671)  


What version of the product are you using? On what operating system?
Simple NLG 4.4 and Matlab R2011a

Please provide any additional information below.

Original issue reported on code.google.com by quanquis...@gmail.com on 20 Mar 2013 at 2:00

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions