Author: gandhirajan
Date: Wed Oct 31 11:03:43 2018
New Revision: 1845321
URL: http://svn.apache.org/viewvc?rev=1845321&view=rev
Log:
REST implementation in cTAKES. CTAKES-473: Creating a REST/SOAP and/or CLI interface
Added:
ctakes/trunk/ctakes-web-rest/
ctakes/trunk/ctakes-web-rest/README
ctakes/trunk/ctakes-web-rest/pom.xml
ctakes/trunk/ctakes-web-rest/src/
ctakes/trunk/ctakes-web-rest/src/main/
ctakes/trunk/ctakes-web-rest/src/main/java/
ctakes/trunk/ctakes-web-rest/src/main/java/org/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/CtakesRestController.java
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/
ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/XMLParser.java
ctakes/trunk/ctakes-web-rest/src/main/resources/
ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/
ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/
ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/types.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/all_cues.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/conditional.psv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/hypothetical.psv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/negation_cue_class.psv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/not_patient_cue_list.psv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/cue_words/speculation.psv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/cue.model (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/featureFile11b
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/generic.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/history.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/i2b2.model (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/polarity.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/pos.model (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/scope.model (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/sharpPolarityFrags.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/sharpUncertaintyFrags.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/models/uncertainty.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/allergy.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/association.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/avoid.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/cause.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/certainty.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/change_state.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/continue.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/copular.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/decline.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/def_determiner.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/deny.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/disappear.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/evidence.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/exception.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/experience.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/fail.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/history.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/hypothetical_cue_list.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/instance.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/stop.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/semantic_classes/uncertainty.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/zoner/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/zoner/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/zoner/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/chunker/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/chunker/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/chunker/models/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/chunker/models/chunker-model.zip (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/models/sharpacq-1.5.bin (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/models/sharpacq-3.1.bin (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/constituency/parser/types/LabeledTree.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/cc/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/cc/jdbc/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/cc/jdbc/TestBinding.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/eclipse/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/eclipse/spellingdictionaryforsourcecode.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/log4j.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sections/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sections/ccda_sections.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/mayo/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/mayo/sdmed.mod
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/sample_sd_included.mod
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/sd-med-model.zip (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/sentdetect/sdmed.mod
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/template.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/tokenizer/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/tokenizer/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/tokenizer/hyphenated.README.mayo
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/tokenizer/hyphenated.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/core/tokenizer/hyphenated_sample.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/anaphoricity.mayo.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/anaphoricity.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/anaphoricity.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/coref.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/dem.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/demngramids.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/frags.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.fdt (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.fdx (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.fnm
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.frq
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.nrm
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.prx
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.tii (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.tis (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.tvd (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.tvf (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/_3.tvx (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/segments.gen (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/index_med_5k/segments_1 (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/ne.mayo.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/ne.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/ngramids.mayo.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/ngramids.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/pron.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/pronngramids.mayo.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/pronngramids.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/pronoun.mayo.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/pronoun.rbf.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/models/stop.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/BinaryRelation.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/BooleanLabeledFS.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/CollectionRelation.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/CoreferenceRelation.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/DiscoveryTechnique.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/Pair.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/PredicateArgRelation.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/Properties.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/Relation.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/RelationArgument.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/coreference/types/VecInst.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/dependency/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/dependency/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/dependency/mayo-en-dep-1.3.0.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/lemmatizer/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/lemmatizer/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/lemmatizer/dictionary-1.3.1.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/pred/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/pred/mayo-en-pred-1.3.0.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/role/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/role/mayo-en-role-1.3.0.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/srl/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/srl/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dependency/parser/models/srl/mayo-en-srl-1.3.0.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/ctakessnorx/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/ctakessnorx/ctakessnorx.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/ctakessnorx/ctakessnorx.script (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/customDictionary.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab.lck (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab.log
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab.script
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/lookup/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/lookup/LookupDesc_DrugNER.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/tokenizer/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/tokenizer/hyphen_freq.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/drugner/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/2005_lemma.voc
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/2005_norm.voc
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/HSqlDb/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/HSqlDb/lvg2008.backup
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/HSqlDb/lvg2008.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/HSqlDb/lvg2008.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/HSqlDb/lvg2008.script
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/ReadMe.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/diacriticMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/ligatureMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/nonStripMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/symbolMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/synonymMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/Unicode/unicodeMap.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/config/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/config/lvg.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/config/lvg.properties.TEMPLATE
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/config/lvg.properties.hsql
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/conjunctionWord.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/nonInfoWords.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/removeS.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/stopWords.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/misc/symbolSynonyms.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/dm.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/exceptionD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/exceptionI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/im.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/plural.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/ruleD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/ruleI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/trieD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/trieI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/lvg/data/rules/verbinfl.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/necontexts/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/necontexts/desc/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/necontexts/desc/NegationAnnotator.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/ExamTitleWords.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/ExamsForPAD.csv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/LookupDesc_PAD.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/StopWords.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/pad_anatomical_sites.csv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lookup/radiology/pad_disorders.csv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/2005_lemma.voc
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/2005_norm.voc
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/sample.prp
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/system/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/system/$db$types.tbl (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/system/sample$db$Cols.tbl (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/system/sample$db$Indexes.tbl (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/IDB/system/sample$db$Tables.tbl (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/ReadMe.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/config/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/config/lvg.properties
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/config/lvg.properties.windows
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/conjunctionWord.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/diacritics.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/ligatures.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/nonInfoWords.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/stopWords.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/misc/symbolSynonyms.data
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/dm.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/exceptionD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/exceptionI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/im.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/plural.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/ruleD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/ruleI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/trieD.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/trieI.data (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/lvg/data/rules/verbinfl.rul
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/negation/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/negation/boundaryData.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/sentenceDetector/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/sentenceDetector/sdmed.mod
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/tokenizer/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/tokenizer/hyphen_freq.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/padtermspotter/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/models/README
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/models/clearnlp/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/models/clearnlp/mayo-en-pos-1.3.0.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/postagger/models/mayo-pos.zip (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/cda/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/cda/NotesIIST_RTF.DTD
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/tokenizer/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/tokenizer/hyphenated.README.mayo
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/tokenizer/hyphenated.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/preprocessor/tokenizer/hyphenated_sample.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/frags_nolex_args.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/degree_of/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/degree_of/model.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/location_of/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/location_of/model.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/modifier_extractor/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/relationextractor/models/modifier_extractor/model.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/classifier/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/classifier/libsvm_model_onWholeSet
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/data/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/data/sentenceLevelMetaKeywords.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/lookup/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/lookup/LookupDesc_sideEffect.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/lookup/LookupDesc_sideEffectUMLS.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/lookup/additionalNE_dictionary.csv
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/lookup/sideEffect_dictionary.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/sideeffect/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/ArtificialSentenceAnnotator.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/KuRuleBasedClassifierAnnotator.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/PcsClassifierAnnotator_libsvm.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/ProductionPostSentenceAggregate_step1.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/ProductionPostSentenceAggregate_step2_libsvm.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/SentenceAdjuster.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/analysis_engine/SmokingStatusDictionaryLookupAnnotator.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/KU/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/KU/keywords.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/KU/unknown_words.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/PCS/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/PCS/keywords_PCS.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/PCS/pcs_libsvm-2.91.model
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/PCS/stopwords_PCS.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/SmokingStatusLookupConfig.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/context/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/context/boundaryData.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/context/negationContradictionWords.txt
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/nonsmoker.dictionary
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/data/smoker.dictionary
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/types/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/smokingstatus/types/TypeSystem.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventevent/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventevent/20150630/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventevent/20150630/model.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventtime/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventtime/20150629/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/temporal/ae/eventtime/20150629/model.jar (with props)
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/mayo_sections.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/section_regex.04162012.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/section_regex.06162011.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/section_regex.out.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/section_regex.xml
ctakes/trunk/ctakes-web-rest/src/main/resources/org/mitre/medfacts/uima/section_regex.xml.bak2
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/AdvancedTokenizerPipeline.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/AttributeCleartkSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/ChunkerSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/CorefSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/Default.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/DictionarySubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/Full.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/TemporalSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/TsAttributeCleartkSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/TsChunkerSubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/TsDefaultTokenizerPipeline.piper
ctakes/trunk/ctakes-web-rest/src/main/resources/pipers/TsDictionarySubPipe.piper
ctakes/trunk/ctakes-web-rest/src/main/webapp/
ctakes/trunk/ctakes-web-rest/src/main/webapp/META-INF/
ctakes/trunk/ctakes-web-rest/src/main/webapp/META-INF/MANIFEST.MF
ctakes/trunk/ctakes-web-rest/src/main/webapp/WEB-INF/
ctakes/trunk/ctakes-web-rest/src/main/webapp/WEB-INF/ctakes-rest-service-servlet.xml
ctakes/trunk/ctakes-web-rest/src/main/webapp/WEB-INF/web.xml
ctakes/trunk/ctakes-web-rest/src/main/webapp/index.jsp
ctakes/trunk/ctakes-web-rest/src/main/webapp/js/
ctakes/trunk/ctakes-web-rest/src/main/webapp/js/app.js
ctakes/trunk/ctakes-web-rest/src/main/webapp/js/jquery.js
Added: ctakes/trunk/ctakes-web-rest/README
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/README?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/README (added)
+++ ctakes/trunk/ctakes-web-rest/README Wed Oct 31 11:03:43 2018
@@ -0,0 +1,27 @@
+This is the README for the REST module in the cTakes project.
+
+This module performs natural language processing of input payload using REST API
+endpoint and extracts out clicnical information in JSON format.
+
+Installation:
+
+1) Build all the cTAKES modules as this module contains a number of references
+to other cTAKES modules.
+
+2) Modify 'src\main\resources\org\apache\ctakes\dictionary\lookup\fast\customDictionary.xml'
+to refer to the respective database where dictionary is loaded or use UMLS database.
+
+3) Build ctakes-web-rest module and deploy ctakes-web-rest.war available
+under 'target' folder in Apache Tomcat.
+
+4) Access the following URL to peform text analysis using cTAKES web application:
+
+ http://<host-name>:<port>/ctakes-web-rest/index.jsp
+
+5) Access the following REST API endpoint to perform text analysis using default pipeline:
+
+ http://<host-name>:<port>/ctakes-web-rest/service/analyze?pipeline=Default
+
+6) Access the following REST API endpoint to perform text analysis using full pipeline:
+
+ http://<host-name>:<port>/ctakes-web-rest/service/analyze?pipeline=Full
\ No newline at end of file
Added: ctakes/trunk/ctakes-web-rest/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/pom.xml?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/pom.xml (added)
+++ ctakes/trunk/ctakes-web-rest/pom.xml Wed Oct 31 11:03:43 2018
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-web-rest</artifactId>
+ <version>4.0.1</version>
+ <name>ctakes-web-rest</name>
+ <packaging>war</packaging>
+ <description></description>
+ <properties>
+ <ctakes.version>4.0.1-SNAPSHOT</ctakes.version>
+ <springframework.version>4.3.12.RELEASE</springframework.version>
+ <jackson.version>2.9.7</jackson.version>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jettyVersion>9.2.6.v20141205</jettyVersion>
+ </properties>
+ <dependencies>
+ <!-- cTAKES module versions-->
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-type-system</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-utils</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-core</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-core-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dictionary-lookup</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dictionary-lookup-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dictionary-lookup-fast</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dictionary-lookup-fast-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-preprocessor</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-pos-tagger</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-pos-tagger-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-chunker</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-chunker-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-lvg</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-lvg-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-context-tokenizer</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-clinical-pipeline</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-clinical-pipeline-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-ne-contexts</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-ne-contexts-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-assertion</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-assertion-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-assertion-zoner</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-assertion-zoner-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-constituency-parser</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-constituency-parser-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-coreference</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-coreference-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-drug-ner</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-drug-ner-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-side-effect</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-side-effect-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-smoking-status</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-smoking-status-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dependency-parser</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-dependency-parser-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-relation-extractor</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-relation-extractor-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-temporal</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ctakes</groupId>
+ <artifactId>ctakes-temporal-res</artifactId>
+ <version>${ctakes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.uima</groupId>
+ <artifactId>uimaj-core</artifactId>
+ <version>2.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.uima</groupId>
+ <artifactId>uimafit-core</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>6.0.6</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+
+
+ </dependencies>
+ <build>
+ <finalName>ctakes-web-rest</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <compilerArgument>-Xlint</compilerArgument>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java (added)
+++ ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java Wed Oct 31 11:03:43 2018
@@ -0,0 +1,26 @@
+package org.apache.ctakes.rest.filter;
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+public class CORSFilter extends OncePerRequestFilter {
+ private static final Log log = LogFactory.getLog(CORSFilter.class);
+
+ @Override
+ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
+ log.debug("Invoking CORS filter");
+ response.addHeader("Access-Control-Allow-Origin", "*");
+ if (request.getHeader("Access-Control-Request-Method") != null && "OPTIONS".equals(request.getMethod())) {
+ response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE");
+ response.addHeader("Access-Control-Allow-Headers", "Content-Type");
+ }
+ filterChain.doFilter(request, response);
+ log.debug("Exiting CORS filter");
+ }
+}
\ No newline at end of file
Added: ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/CtakesRestController.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/CtakesRestController.java?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/CtakesRestController.java (added)
+++ ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/service/CtakesRestController.java Wed Oct 31 11:03:43 2018
@@ -0,0 +1,126 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ctakes.rest.service;
+
+import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.apache.ctakes.core.pipeline.PipelineBuilder;
+import org.apache.ctakes.core.pipeline.PiperFileReader;
+import org.apache.ctakes.rest.util.XMLParser;
+import org.apache.log4j.Logger;
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.analysis_engine.AnalysisEngine;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.cas.impl.XmiCasSerializer;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.util.JCasPool;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.ServletException;
+import java.io.ByteArrayInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+
+/*
+ * Rest web service that takes clinical text
+ * as input and produces extracted text as output
+ */
+@RestController
+public class CtakesRestController {
+
+ private static final Logger LOGGER = Logger.getLogger(CtakesRestController.class);
+ private static final String DEFAULT_PIPER_FILE_PATH = "pipers/Default.piper";
+ private static final String FULL_PIPER_FILE_PATH = "pipers/Full.piper";
+ private static final String DEFAULT_PIPELINE = "Default";
+ private static final String FULL_PIPELINE = "Full";
+ private static final Map<String, PipelineRunner> _pipelineRunners = new HashMap<>();
+
+ @PostConstruct
+ public void init() throws ServletException {
+ LOGGER.info("Initializing analysis engines and jcas pools");
+ _pipelineRunners.put(DEFAULT_PIPELINE, new PipelineRunner(DEFAULT_PIPER_FILE_PATH));
+ _pipelineRunners.put(FULL_PIPELINE, new PipelineRunner(FULL_PIPER_FILE_PATH));
+ }
+
+ @RequestMapping(value = "/analyze", method = RequestMethod.POST)
+ @ResponseBody
+ public Map<String, Map<String, List<String>>> getAnalyzedJSON(@RequestBody String analysisText,
+ @RequestParam("pipeline") Optional<String> pipelineOptParam)
+ throws Exception {
+ String pipeline = DEFAULT_PIPELINE;
+ if(pipelineOptParam.isPresent()) {
+ if(FULL_PIPELINE.equalsIgnoreCase(pipelineOptParam.get())) {
+ pipeline = FULL_PIPELINE;
+ }
+ }
+ final PipelineRunner runner = _pipelineRunners.get(pipeline);
+ return runner.process(analysisText);
+
+ }
+
+ static private Map<String, Map<String, List<String>>> formatResults(JCas jcas) throws Exception {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ XmiCasSerializer.serialize(jcas.getCas(), output);
+ String outputStr = output.toString();
+ // For debugging: Files.write(Paths.get("Result.xml"), outputStr.getBytes());
+ XMLParser parser = new XMLParser();
+ return parser.parse(new ByteArrayInputStream(outputStr.getBytes()));
+ }
+
+ static private final class PipelineRunner {
+ private final AnalysisEngine _engine;
+ private final JCasPool _pool;
+
+ private PipelineRunner(final String piperPath) throws ServletException {
+ try {
+ PiperFileReader reader = new PiperFileReader(piperPath);
+ PipelineBuilder builder = reader.getBuilder();
+ AnalysisEngineDescription pipeline = builder.getAnalysisEngineDesc();
+ _engine = UIMAFramework.produceAnalysisEngine(pipeline);
+ _pool = new JCasPool(10, _engine);
+ } catch (Exception e) {
+ LOGGER.error("Error loading pipers");
+ throw new ServletException(e);
+ }
+ }
+
+ public Map<String, Map<String, List<String>>> process(final String text) throws ServletException {
+ JCas jcas = null;
+ Map<String, Map<String, List<String>>> resultMap = null;
+ if (text != null) {
+ try {
+ jcas = _pool.getJCas(-1);
+ jcas.setDocumentText(text);
+ _engine.process(jcas);
+ resultMap = formatResults(jcas);
+ _pool.releaseJCas(jcas);
+ } catch (Exception e) {
+ LOGGER.error("Error processing Analysis engine");
+ throw new ServletException(e);
+ }
+ }
+ return resultMap;
+ }
+ }
+}
Added: ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/XMLParser.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/XMLParser.java?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/XMLParser.java (added)
+++ ctakes/trunk/ctakes-web-rest/src/main/java/org/apache/ctakes/rest/util/XMLParser.java Wed Oct 31 11:03:43 2018
@@ -0,0 +1,237 @@
+package org.apache.ctakes.rest.util;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+
+public class XMLParser {
+
+ Map<String, String> polarityMap = new HashMap<>();
+
+ public Map<String, Map<String, List<String>>> parse(InputStream in) throws Exception {
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ XMLStreamReader streamReader = inputFactory.createXMLStreamReader(in);
+ String analysisText = null;
+ Map<String, String> ontologyArrayMap = new HashMap<>();
+ Map<String, List> umlsConceptMap = new HashMap<>();
+ List<String> disorderList = new ArrayList<>();
+ List<String> findingsList = new ArrayList<>();
+ List<String> procedureList = new ArrayList<>();
+ List<String> timeList = new ArrayList<>();
+ List<String> fractionStrengthList = new ArrayList<>();
+ List<String> drugChangeStatusList = new ArrayList<>();
+ List<String> strengthUnitList = new ArrayList<>();
+ List<String> strengthList = new ArrayList<>();
+ List<String> routeList = new ArrayList<>();
+ List<String> frequencyUnitList = new ArrayList<>();
+ List<String> measurementList = new ArrayList<>();
+ List<String> dateList = new ArrayList<>();
+ List<String> anatomicalList = new ArrayList<>();
+ List<String> medicalList = new ArrayList<>();
+
+ Map<String, String> disorderPosMap = new HashMap<>();
+ Map<String, String> findingsPosMap = new HashMap<>();
+ Map<String, String> procedurePosMap = new HashMap<>();
+ Map<String, String> timePosMap = new HashMap<>();
+ Map<String, String> fractionStrengthPosMap = new HashMap<>();
+ Map<String, String> drugChangeStatusPosMap = new HashMap<>();
+ Map<String, String> strengthUnitPosMap = new HashMap<>();
+ Map<String, String> strengthPosMap = new HashMap<>();
+ Map<String, String> routePosMap = new HashMap<>();
+ Map<String, String> datePosMap = new HashMap<>();
+ Map<String, String> frequencyPosMap = new HashMap<>();
+ Map<String, String> measurementPosMap = new HashMap<>();
+ Map<String, String> anatomicalPosMap = new HashMap<>();
+ Map<String, String> medicalPosMap = new HashMap<>();
+
+
+ Map<String, List<String>> disorderDetailMap = new HashMap<>();
+ Map<String, List<String>> findingsDetailMap = new HashMap<>();
+ Map<String, List<String>> procedureDetailMap = new HashMap<>();
+ Map<String, List<String>> timeDetailMap = new HashMap<>();
+ Map<String, List<String>> fractionStrengthDetailMap = new HashMap<>();
+ Map<String, List<String>> drugChangeStatusDetailMap = new HashMap<>();
+ Map<String, List<String>> strengthUnitDetaillMap = new HashMap<>();
+ Map<String, List<String>> strengthDetailMap = new HashMap<>();
+ Map<String, List<String>> routeDetailMap = new HashMap<>();
+ Map<String, List<String>> frequencyUnitDetailMap = new HashMap<>();
+ Map<String, List<String>> measurementDetailMap = new HashMap<>();
+ Map<String, List<String>> dateDetailMap = new HashMap<>();
+ Map<String, List<String>> anatomicalDetailMap = new HashMap<>();
+ Map<String, List<String>> medicalDetailMap = new HashMap<>();
+
+ while (streamReader.hasNext()) {
+ if (streamReader.isStartElement()) {
+ if (analysisText == null) {
+ if (streamReader.getLocalName().equalsIgnoreCase("Sofa")) {
+ analysisText = streamReader.getAttributeValue(null,"sofaString");
+ }
+ }
+ try {
+ disorderList = extractData(streamReader, analysisText, SemanticNames.DiseaseDisorderMention.name(), disorderPosMap, disorderList, ontologyArrayMap);
+ findingsList = extractData(streamReader, analysisText, SemanticNames.SignSymptomMention.name(), findingsPosMap, findingsList, ontologyArrayMap);
+ procedureList = extractData(streamReader, analysisText, SemanticNames.ProcedureMention.name(), procedurePosMap, procedureList, ontologyArrayMap);
+ timeList = extractData(streamReader, analysisText, SemanticNames.TimeMention.name(), timePosMap, timeList, ontologyArrayMap);
+ fractionStrengthList = extractData(streamReader, analysisText, SemanticNames.FractionStrengthAnnotation.name(), fractionStrengthPosMap, fractionStrengthList, ontologyArrayMap);
+ drugChangeStatusList = extractData(streamReader, analysisText, SemanticNames.DrugChangeStatusAnnotation.name(), drugChangeStatusPosMap, drugChangeStatusList, ontologyArrayMap);
+ strengthUnitList = extractData(streamReader, analysisText, SemanticNames.StrengthUnitAnnotation.name(), strengthUnitPosMap, strengthUnitList, ontologyArrayMap);
+ strengthList = extractData(streamReader, analysisText, SemanticNames.StrengthAnnotation.name(), strengthPosMap, strengthList, ontologyArrayMap);
+ routeList = extractData(streamReader, analysisText, SemanticNames.RouteAnnotation.name(), routePosMap, routeList, ontologyArrayMap);
+ frequencyUnitList = extractData(streamReader, analysisText, SemanticNames.FrequencyUnitAnnotation.name(), frequencyPosMap, frequencyUnitList, ontologyArrayMap);
+ dateList = extractData(streamReader, analysisText, SemanticNames.DateAnnotation.name(), datePosMap, dateList, ontologyArrayMap);
+ measurementList = extractData(streamReader, analysisText, SemanticNames.MeasurementAnnotation.name(), measurementPosMap, measurementList, ontologyArrayMap);
+ anatomicalList = extractData(streamReader, analysisText, SemanticNames.AnatomicalSiteMention.name(), anatomicalPosMap, anatomicalList, ontologyArrayMap);
+ medicalList = extractData(streamReader, analysisText, SemanticNames.MedicationMention.name(), medicalPosMap, medicalList, ontologyArrayMap);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ if (streamReader.getLocalName().equalsIgnoreCase("UmlsConcept")) {
+ String id = streamReader.getAttributeValue(null, "id");
+ List<String> umlsDetailList = new ArrayList<>();
+ umlsDetailList.add("codingScheme: " + streamReader.getAttributeValue(null, "codingScheme"));
+ umlsDetailList.add("code: " + streamReader.getAttributeValue(null, "code"));
+ umlsDetailList.add("cui: " + streamReader.getAttributeValue(null, "cui"));
+ umlsDetailList.add("tui: " + streamReader.getAttributeValue(null, "tui"));
+ umlsConceptMap.put(id, umlsDetailList);
+ }
+ }
+ streamReader.next();
+ }
+
+ disorderDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, disorderDetailMap, disorderList, disorderPosMap);
+ findingsDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, findingsDetailMap, findingsList, findingsPosMap);
+ procedureDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, procedureDetailMap, procedureList, procedurePosMap);
+ timeDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, timeDetailMap, timeList, timePosMap);
+ fractionStrengthDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, fractionStrengthDetailMap, fractionStrengthList, fractionStrengthPosMap);
+ drugChangeStatusDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, drugChangeStatusDetailMap, drugChangeStatusList, drugChangeStatusPosMap);
+ strengthUnitDetaillMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, strengthUnitDetaillMap, strengthUnitList, strengthUnitPosMap);
+ strengthDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, strengthDetailMap, strengthList, strengthPosMap);
+ routeDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, routeDetailMap, routeList, routePosMap);
+ frequencyUnitDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, frequencyUnitDetailMap, frequencyUnitList, frequencyPosMap);
+ measurementDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, measurementDetailMap, measurementList, measurementPosMap);
+ dateDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, dateDetailMap, dateList, datePosMap);
+ anatomicalDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, anatomicalDetailMap, anatomicalList, anatomicalPosMap);
+ medicalDetailMap = processUMLSDetail(ontologyArrayMap, umlsConceptMap, medicalDetailMap, medicalList, medicalPosMap);
+
+ Map<String, Map<String, List<String>>> responseMap = new HashMap<>();
+ responseMap.put(SemanticNames.DiseaseDisorderMention.name(), disorderDetailMap);
+ responseMap.put(SemanticNames.SignSymptomMention.name(),findingsDetailMap);
+ responseMap.put(SemanticNames.ProcedureMention.name(),procedureDetailMap);
+ responseMap.put(SemanticNames.AnatomicalSiteMention.name(),anatomicalDetailMap);
+ responseMap.put(SemanticNames.MedicationMention.name(),medicalDetailMap);
+ responseMap.put(SemanticNames.TimeMention.name(),timeDetailMap);
+ responseMap.put(SemanticNames.FractionStrengthAnnotation.name(),fractionStrengthDetailMap);
+ responseMap.put(SemanticNames.DrugChangeStatusAnnotation.name(),drugChangeStatusDetailMap);
+ responseMap.put(SemanticNames.StrengthUnitAnnotation.name(),strengthUnitDetaillMap);
+ responseMap.put(SemanticNames.StrengthAnnotation.name(),strengthDetailMap);
+ responseMap.put(SemanticNames.RouteAnnotation.name(),routeDetailMap);
+ responseMap.put(SemanticNames.FrequencyUnitAnnotation.name(),frequencyUnitDetailMap);
+ responseMap.put(SemanticNames.DateAnnotation.name(),dateDetailMap);
+ responseMap.put(SemanticNames.MeasurementAnnotation.name(),measurementDetailMap);
+ return responseMap;
+ }
+
+ private Map<String, List<String>> processUMLSDetail(Map<String, String> ontologyArrayMap, Map<String, List> umlsConceptMap, Map<String, List<String>> semanticDetailsMap,
+ List<String> sematicList, Map<String, String> semanticPosMap) {
+ for (String semanticName : sematicList) {
+ List<String> semanticDetailsList = semanticDetailsMap.get(semanticName);
+ String[] posDetail = semanticPosMap.get(semanticName).split(",");
+ if(semanticDetailsList == null) {
+ semanticDetailsList = new ArrayList<>();
+ }
+ semanticDetailsList.add("start: " + posDetail[0]);
+ semanticDetailsList.add("end: " + posDetail[1]);
+ if(polarityMap.get(semanticName) != null) {
+ semanticDetailsList.add("polarity: " + polarityMap.get(semanticName));
+ }
+ String ontologyArrayRawString = ontologyArrayMap.get(semanticName);
+ if(ontologyArrayRawString != null) {
+ String[] ontologyStringArr = ontologyArrayRawString.split("\\s");
+ for (String ontologyString : ontologyStringArr) {
+ List umlsDetList = umlsConceptMap.get(ontologyString);
+ if (umlsDetList != null && umlsDetList.size() > 0) {
+ if (!umlsDetList.contains(semanticDetailsList)) {
+ semanticDetailsList.add(umlsDetList.toString());
+ }
+ }
+ semanticDetailsMap.put(semanticName, semanticDetailsList);
+ }
+ }
+ else {
+ semanticDetailsMap.put(semanticName, semanticDetailsList);
+ }
+ }
+ return semanticDetailsMap;
+ }
+
+ private List<String> extractData(XMLStreamReader streamReader, String analysisText, String mentionName, Map<String, String> semanticPosMap,
+ List<String> semanticList, Map<String, String> ontologyArrayMap) {
+ if (streamReader.getLocalName().equalsIgnoreCase(mentionName)) {
+ Integer start = Integer.parseInt(streamReader.getAttributeValue(null, "begin"));
+ Integer end = Integer.parseInt(streamReader.getAttributeValue(null, "end"));
+ String ontologyConceptArr = streamReader.getAttributeValue(null, "ontologyConceptArr");
+ String polarity = streamReader.getAttributeValue(null, "polarity");
+ String chunk = analysisText.substring(start, end);
+ String chunkUpper = chunk.toUpperCase();
+ boolean isFound = false;
+ if (!semanticList.contains(chunkUpper)) {
+ String chunkArray[] = chunk.split("\\s");
+ for (String chunkedString : chunkArray) {
+ final String trimmedChunkString = chunkedString.trim();
+ if (!trimmedChunkString.equals("")) {
+ Object[] matchedSemanticArray = semanticList.stream().filter(str -> str.trim().contains(trimmedChunkString.toUpperCase())).toArray();
+ if (matchedSemanticArray.length > 0) {
+ for (Object semanticObj : matchedSemanticArray) {
+ String semanticTerm = semanticObj.toString();
+ String pos = semanticPosMap.get(semanticTerm);
+ if (pos != null) {
+ String posArr[] = pos.split(",");
+ int startPos = Integer.parseInt(posArr[0]);
+ int endPos = Integer.parseInt(posArr[1]);
+ if (start >= startPos && end <= endPos) {
+ isFound = true;
+ break;
+ }
+ if (start <= startPos && end == endPos) {
+ semanticList.remove(semanticTerm);
+ semanticList.add(chunkUpper);
+ ontologyArrayMap.put(chunkUpper, ontologyConceptArr);
+ semanticPosMap.remove(semanticTerm);
+ semanticPosMap.put(chunkUpper, start + "," + end);
+ isFound = true;
+ if(polarity!=null) {
+ polarityMap.put(chunkUpper,polarity);
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (!isFound) {
+ semanticList.add(chunkUpper);
+ if(polarity!=null) {
+ polarityMap.put(chunkUpper,polarity);
+ }
+ ontologyArrayMap.put(chunkUpper, ontologyConceptArr);
+ //System.out.println("mentionName -> " + mentionName + " part -> " + chunkUpper + " -- " + start + "," + end);
+ semanticPosMap.put(chunkUpper, start + "," + end);
+ }
+
+ }
+ }
+ return semanticList;
+ }
+
+ public enum SemanticNames {
+ DiseaseDisorderMention, SignSymptomMention, ProcedureMention, TimeMention,
+ AnatomicalSiteMention, FractionStrengthAnnotation, DrugChangeStatusAnnotation,
+ StrengthUnitAnnotation, StrengthAnnotation, RouteAnnotation, FrequencyUnitAnnotation, DateAnnotation,
+ MeasurementAnnotation, MedicationMention
+ }
+}
Added: ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/types.txt
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/types.txt?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/types.txt (added)
+++ ctakes/trunk/ctakes-web-rest/src/main/resources/META-INF/org.uimafit/types.txt Wed Oct 31 11:03:43 2018
@@ -0,0 +1 @@
+classpath*:org/apache/ctakes/assertion/zoner/types/TypeSystem.xml
Added: ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/all_cues.txt
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/all_cues.txt?rev=1845321&view=auto
==============================================================================
--- ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/all_cues.txt (added)
+++ ctakes/trunk/ctakes-web-rest/src/main/resources/org/apache/ctakes/assertion/all_cues.txt Wed Oct 31 11:03:43 2018
@@ -0,0 +1,454 @@
+conditional on exertion
+conditional on exercise
+conditional with exertion
+conditional with exercise
+conditional exertional
+conditional intolerance
+conditional after
+conditional post
+conditional while
+conditional when
+conditional planned
+conditional in the event
+conditional if
+conditional awaiting
+conditional continued
+conditional proceed
+conditional plan
+conditionalavoid scheduled
+hypothetical avoiding
+hypothetical avoidance
+hypothetical if
+hypothetical unless
+hypothetical monitor for
+hypothetical monitors for
+hypothetical monitored for
+hypothetical monitoring for
+hypothetical prn
+hypothetical PRN
+hypothetical p.r.n.
+hypothetical P.R.N.
+hypothetical as needed for
+hypothetical as necessary for
+hypothetical call for
+hypothetical call with
+hypothetical return for
+hypothetical return with
+hypothetical return
+hypothetical watch for
+hypothetical report new
+hypothetical potential
+hypothetical potentially
+hypothetical instructions for
+hypothetical prevent
+hypothetical preventing
+hypothetical prevention
+hypothetical risk
+hypothetical risk stratification for
+hypothetical future
+hypothetical immunization against
+hypothetical should
+hypothetical should he experience
+hypothetical should she experience
+hypothetical should the patient experience
+hypothetical prophylaxis
+hypothetical prophylactic
+negation not
+negation n't
+negation 't
+negation didn't
+negation doesn't
+negation don't
+negation isn't
+negation aren't
+negation wasn't
+negation weren't
+negation hadn't
+negation hasn't
+negation haven't
+negation won't
+negation wouldn't
+negation never
+negation no longer
+negation in no way
+negation neither
+negation nor
+negation none
+negation nobody
+negation no one
+negation nowhere
+negation no place
+negation no
+negation without
+negation absence of
+negation free of
+negation clear of
+negation clear to
+negation negative for
+negation neg for
+negation negative for
+negation unremarkable for
+negation unassociated with
+negation ( - )
+negation non
+negation lack of
+negation lack
+negation lacked
+negation lacks
+negation lacking
+negation impossible
+negation cannot
+negation can't
+negation couldn't
+negation inability
+negation unable
+negation forget
+negation forgets
+negation forgetting
+negation forgot
+negation forgotten
+negation fail
+negation failed
+negation failing
+negation fails
+negation failure
+negation free of
+negation free
+negation absent
+negation immune to
+negation denied
+negation denies
+negation deny
+negation denying
+negation avoided
+negation avoids
+negation prevented
+negation prevents
+negation prophylaxis against
+negation shouldn't
+negation mustn't
+negation unwilling
+negation unwillingness
+negation reluctance
+negation reluctant
+negation decline
+negation declined
+negation declines
+negation declining
+negation refusal
+negation refuse
+negation refused
+negation refuses
+negation refusing
+negation excluded
+negation excludes
+negation ruled out
+negation rules out
+negation discontinuance
+negation discontinuation
+negation discontinue
+negation discontinued
+negation discontinues
+negation discontinuing
+negation quit
+negation quits
+negation quitting
+negation stop
+negation stopped
+negation stopping
+negation stops
+negation used to
+negation held
+negation hold
+negation holding
+negation holds
+negation on hold
+negation off
+negation elimination
+negation eliminate
+negation eliminated
+negation eliminates
+negation eliminating
+negation eradication
+negation eradicate
+negation eradicated
+negation eradicates
+negation eradicating
+negation removal
+negation remove
+negation removed
+negation removes
+negation removing
+negation purge
+negation purged
+negation purges
+negation purging
+negation wipe out
+negation wiped out
+negation wipes out
+negation wiping out
+negation rid
+negation interrupt
+negation interruption
+negation interruptions
+negation resolved
+negation resolution
+negation disappeared
+negation disappearance
+negation rather than
+negation instead of
+negation except
+negation exception
+negation besides
+negation aside from
+negation other than
+not_patient mother
+not_patient father
+not_patient parent
+not_patient parents
+not_patient sister
+not_patient sisters
+not_patient brother
+not_patient brothers
+not_patient sibling
+not_patient siblings
+not_patient grandfather
+not_patient grandfathers
+not_patient grandmother
+not_patient grandmothers
+not_patient cousin
+not_patient cousins
+not_patient aunt
+not_patient aunts
+not_patient uncle
+not_patient uncles
+not_patient stepfather
+not_patient stepmother
+not_patient cousin
+not_patient cousins
+not_patient niece
+not_patient nieces
+not_patient nephew
+not_patient nephews
+not_patient wife
+not_patient husband
+not_patient spouse
+not_patient partner
+not_patient partners
+not_patient roommate
+not_patient roommates
+not_patient classmate
+not_patient classmates
+not_patient friend
+not_patient friends
+not_patient acquaintance
+not_patient acquaintances
+not_patient individual
+not_patient individuals
+not_patient person
+not_patient persons
+not_patient relative
+not_patient relatives
+not_patient family
+not_patient family member
+not_patient family members
+not_patient familiy history of
+not_patient fhx of
+not_patient fam hx of
+not_patient family hx
+not_patient twin
+not_patient familial
+speculation uncertain
+speculation unsure
+speculation improbable
+speculation unlikely
+speculation doubtful
+speculation doubt
+speculation doubted
+speculation doubting
+speculation doubts
+speculation possible
+speculation poss
+speculation hypothetical
+speculation questionable
+speculation consistent with
+speculation compatible with
+speculation equivocal for
+speculation suspicious for
+speculation potential
+speculation concerned for
+speculation concerning for
+speculation worrisome for
+speculation unclear
+speculation unknown
+speculation possibly
+speculation potentially
+speculation maybe
+speculation perhaps
+speculation possibilities
+speculation possibility
+speculation evidence for
+speculation evidence of
+speculation speculation
+speculation consideration
+speculation ?
+speculation ddx
+speculation differential diagnosis
+speculation differential diagnoses
+speculation believe
+speculation believed
+speculation believes
+speculation believing
+speculation consider
+speculation considered
+speculation considering
+speculation considers
+speculation t/c
+speculation entertain
+speculation entertained
+speculation entertaining
+speculation entertains
+speculation question
+speculation questioned
+speculation questioning
+speculation questions
+speculation speculate
+speculation speculated
+speculation speculates
+speculation speculating
+speculation can
+speculation could
+speculation may
+speculation might
+speculation whether or not
+speculation whether
+speculation either
+speculation or
+speculation if
+speculation unless
+ probable prob_adj
+speculation likely
+speculation presumed
+speculation presumptive
+speculation apparent
+speculation preliminary
+speculation putative
+speculation indicative of
+speculation suggestive of
+speculation typical of
+speculation probably
+speculation likely
+speculation presumably
+speculation apparently
+speculation reportedly
+speculation seemingly
+speculation supposedly
+speculation must
+speculation appear
+speculation appeared
+speculation appearing
+speculation appears
+speculation seem
+speculation seemed
+speculation seems
+speculation seeming
+speculation estimate
+speculation estimated
+speculation estimates
+speculation estimating
+speculation feel that
+speculation feeling that
+speculation feels that
+speculation felt that
+speculation hypothesize
+speculation hypothesized
+speculation hypothesizes
+speculation hypothesizing
+speculation implied
+speculation implies
+speculation imply
+speculation implying
+speculation indicate
+speculation indicated
+speculation indicates
+speculation indicating
+speculation postulate
+speculation postulated
+speculation postulating
+speculation postulates
+speculation propose
+speculation proposed
+speculation proposes
+speculation proposing
+speculation suggest
+speculation suggested
+speculation suggesting
+speculation suggests
+speculation support
+speculation supported
+speculation supporting
+speculation supports
+speculation suppose
+speculation supposed
+speculation supposes
+speculation supposing
+speculation suspect
+speculation suspected
+speculation suspecting
+speculation suspects
+speculation think
+speculation thinks
+speculation thinking
+speculation thought
+speculation concern for
+speculation concerns for
+speculation implication
+speculation implications
+speculation impression of
+speculation indication of
+speculation indications of
+speculation suspicion
+speculation suspicions
+speculation suggestion
+speculation suggestions
+speculation hypothesis
+speculation hypotheses
+speculation probability
+speculation probabilities
+speculation sign of
+speculation signs of
+speculation v.s.
+speculation versus
+speculation vs.
+speculation vs
+speculation r / o
+speculation ro
+speculation r/o
+speculation rule out
+speculation ruling out
+speculation rule - out
+speculation ruling - out
+speculation test for
+speculation tested for
+speculation testing for
+speculation tests for
+speculation check for
+speculation checked for
+speculation checking for
+speculation checks for
+speculation evaluate for
+speculation eval for
+speculation evaluated for
+speculation evaluates for
+speculation evaluating for
+speculation evaluation for
+speculation assess for
+speculation assessment for
+speculation monitor for
+speculation monitored for
+speculation monitoring for
+speculation monitors for
+speculation seriologies for
+speculation seriology for
+speculation work up for
+speculation workup for
|