{"id":207,"date":"2016-06-28T00:01:37","date_gmt":"2016-06-28T00:01:37","guid":{"rendered":"http:\/\/uscictdialdev.wpenginepowered.com\/?page_id=207"},"modified":"2016-07-26T22:02:50","modified_gmt":"2016-07-26T22:02:50","slug":"simplenlg","status":"publish","type":"page","link":"https:\/\/dialport.ict.usc.edu\/index.php\/simplenlg\/","title":{"rendered":"SimpleNLG"},"content":{"rendered":"<p><strong><a class=\"ext-link\" href=\"https:\/\/github.com\/simplenlg\/simplenlg\">GitHub<\/a>\u00a0 \u00a0<a href=\"https:\/\/github.com\/simplenlg\/simplenlg\/wiki\/Section-0-%E2%80%93-SimpleNLG-Tutorial\">Tutorial<\/a>\u00a0 \u00a0<a href=\"https:\/\/cdn.rawgit.com\/simplenlg\/simplenlg\/master\/docs\/javadoc\/index.html\">API Reference<\/a><\/strong><\/p>\n<p><strong>SimpleNLG<\/strong> is a simple Java API designed to facilitate the generation of Natural Language. It was originally developed at the<a href=\"http:\/\/www.abdn.ac.uk\/ncs\/departments\/computing-science\/index.php\">University of Aberdeen&#8217;s Department of Computing Science<\/a>. The <a href=\"https:\/\/groups.google.com\/forum\/#!forum\/simplenlg\">discussion list for SimpleNLG is on Google Groups<\/a>.<\/p>\n<p>SimpleNLG is intended to function as a &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Realization_(linguistics)\">realisation engine<\/a>&#8221; for <a href=\"http:\/\/en.wikipedia.org\/wiki\/Natural_language_generation\">Natural Language Generation<\/a> architectures, and has been used successfully in a number of projects, both academic and commercial. It handles the following:<\/p>\n<ul>\n<li>Lexicon\/morphology system: The default lexicon computes inflected forms (morphological realisation). We believe this has fair coverage. Better coverage can be obtained by using the <a href=\"http:\/\/lexsrv3.nlm.nih.gov\/LexSysGroup\/Projects\/lexicon\/current\/web\/\">NIH Specialist Lexicon<\/a> (which is supported by SimpleNLG).<\/li>\n<li>Realiser: Generates texts from a syntactic form. Grammatical coverage is limited compared to tools such as <a href=\"http:\/\/www.fb10.uni-bremen.de\/anglistik\/langpro\/kpml\/README.html\">KPML<\/a> and<a href=\"http:\/\/www.cs.bgu.ac.il\/surge\/index.html\">FUF\/SURGE<\/a>, but we believe it is adequate for many NLG tasks.<\/li>\n<li>Microplanning: Currently just simple aggregation, hopefully will grow over time.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Getting Started (adapted from <a href=\"https:\/\/github.com\/simplenlg\/simplenlg\/wiki\/Section%20III%20%E2%80%93%20Getting%20started\">here<\/a>)<\/h3>\n<p>SimpleNLG is a library, which means it cannot run as a stand alone application. You will need to have your own Java program\/main method that utilizes the classes and methods in the SimpleNLG library.<\/p>\n<p>&nbsp;<\/p>\n<p>To enable your program to make use of the simplenlg library, you\u2019ll need to:<\/p>\n<ul>\n<li>Download the simplenlg zip file from the Download tab.<\/li>\n<li>Extract then add simplenlg\u2019s jar file to your classpath. (For instructions on how to do this in Eclipse, see Appendix B).<\/li>\n<li>Create a new Java class which has the main method in it. In this example, let\u2019s call the new class TestMain.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>At the top of that class, put in the following import statements:\n<pre><code>import simplenlg.framework.*;\r\nimport simplenlg.lexicon.*;\r\nimport simplenlg.realiser.english.*;\r\nimport simplenlg.phrasespec.*;\r\nimport simplenlg.features.*;\r\n<\/code><\/pre>\n<\/li>\n<li>Create a SimpleNLG lexicon, NLGFactory, and realiser using the following statements:\n<pre><code>Lexicon lexicon = Lexicon.getDefaultLexicon();\r\nNLGFactory nlgFactory = new NLGFactory(lexicon);\r\nRealiser realiser = new Realiser(lexicon);\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>Following these steps, you should have code that looks like the following:<\/p>\n<pre><code>    import simplenlg.framework.*;\r\n    import simplenlg.lexicon.*;\r\n    import simplenlg.realiser.english.*;\r\n    import simplenlg.phrasespec.*;\r\n    import simplenlg.features.*;\r\n\r\n\r\n    public class TestMain {\r\n\r\n            public static void main(String[] args) {\r\n                    Lexicon lexicon = Lexicon.getDefaultLexicon();\r\n                    NLGFactory nlgFactory = new NLGFactory(lexicon);\r\n                    Realiser realiser = new Realiser(lexicon);\r\n\r\n            }\r\n\r\n    }\r\n<\/code><\/pre>\n<p>You\u2019re now ready to make use of simplenlg to generate sentences!<\/p>\n<p>\u2192 For further examples on ways to use simplenlg, take a look at the java files in <code>testsrc<\/code>. A stand-alone example is provided in <code>testsrc\/StandAloneExample.java<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub\u00a0 \u00a0Tutorial\u00a0 \u00a0API Reference SimpleNLG is a simple Java API designed to facilitate the generation of Natural Language. It was originally developed at theUniversity of Aberdeen&#8217;s Department of Computing Science. The discussion list for SimpleNLG is on Google Groups. SimpleNLG is intended to function as a &#8220;realisation engine&#8221; for Natural Language Generation architectures, and has [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-207","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":0,"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/pages\/207\/revisions"}],"wp:attachment":[{"href":"https:\/\/dialport.ict.usc.edu\/index.php\/wp-json\/wp\/v2\/media?parent=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}