Java Code Examples for org.apache.uima.UIMAException#printStackTrace()
The following examples show how to use
org.apache.uima.UIMAException#printStackTrace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImprovedLuceneInMemorySentenceRetrievalExecutor.java From bioasq with Apache License 2.0 | 6 votes |
private HashMap<String, String> sentenceAnalysis(String sentence) { HashMap<String, String> dependency = new HashMap<String, String>(); try { JCas snippetJcas = JCasFactory.createJCas(); snippetJcas.setDocumentText(sentence); List<Token> tokens = parserProvider.parseDependency(snippetJcas); for (Token tok : tokens) { if (tok.getHead() == null) continue; dependency.put(tok.getLemmaForm(), tok.getHead().getLemmaForm()); } snippetJcas.release(); } catch (UIMAException err) { err.printStackTrace(); } return dependency; }
Example 2
Source File: TestUtil.java From termsuite-core with Apache License 2.0 | 5 votes |
public static JCas createJCas() { try { return JCasFactory.createJCas(); } catch (UIMAException e) { e.printStackTrace(); throw new RuntimeException(e); } }