### Question:
SimpleNLGwithPostprocessing implements Sparql2NLConverter { @Override public String getNLR(Query inputQuery) { logger.info("Verbalizing SPARQL query\n" + inputQuery); Query query = QueryFactory.create(inputQuery); query = queryRewriter.rewriteAggregates(inputQuery); query = new DisjunctiveNormalFormConverter().getDisjunctiveNormalForm(query); String output = ""; POSTPROCESSING = false; SWITCH = false; UNIONSWITCH = false; output = realiseDocument(convert2NLE(query)); logger.info("Before post processing:\n" + output); if (VERBOSE) { post.TRACE = true; } post.postprocess(); POSTPROCESSING = true; output = realiseDocument(convert2NLE(query)); output = output.replace(",,", ",").replace("..", ".").replace(".,", ","); logger.info("After postprocessing:\n" + output); post.flush(); output = output.replaceAll(Pattern.quote("\n"), ""); return output; } SimpleNLGwithPostprocessing(SparqlEndpoint endpoint);  SimpleNLGwithPostprocessing(SparqlEndpoint endpoint, Dictionary wordnetDirectory);  SimpleNLGwithPostprocessing(SparqlEndpoint endpoint, String cacheDirectory, Dictionary wordnetDirectory);  SimpleNLGwithPostprocessing(QueryExecutionFactory qef, String cacheDirectory, Dictionary wordnetDirectory);  SimpleNLGwithPostprocessing(Model model, Dictionary wordnetDirectory); static boolean isWindows(); void setUseBOA(boolean useBOA); String realiseDocument(DocumentElement d); @Override String getNLR(Query inputQuery); @Override DocumentElement convert2NLE(Query query); DocumentElement convertSelectAndAsk(Query query); NPPhraseSpec getNPPhrase(String className, boolean plural); NPPhraseSpec getNPPhrase(String uri, boolean plural, boolean isClass); DocumentElement convertDescribe(Query query); NLGElement getNLFromElements(List<Element> e); NLGElement getNLForTripleList(List<Triple> triples, String conjunction); NLGElement getNLFromSingleClause(Element e); SPhraseSpec getNLForTriple(Triple t); SPhraseSpec getNLForTriple(Triple t, boolean outgoing); static void main(String args[]); public Lexicon lexicon; public NLGFactory nlgFactory; public Realiser realiser; static final String ENTITY; static final String VALUE; static final String UNKNOWN; public boolean VERBOSE; public boolean POSTPROCESSING; }### Answer:
@Test public void testAggregate() { Query query = id2Queries.get("1"); String nlr = nlg.getNLR(query); System.out.println(nlr); }
@Test public void testMainEntityIsObjectOnly() { Query query = id2Queries.get("2"); String nlr = nlg.getNLR(query); System.out.println(nlr); }