mstfdynr / simplenlg

Automatically exported from code.google.com/p/simplenlg
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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