├── .gitignore ├── DeepQA ├── .DS_Store ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── C:\log4j-application.log └── src │ ├── deepqa │ ├── CategorizeQue.java │ ├── InitiateQue.java │ ├── constants │ │ └── Constants.java │ ├── cr │ │ ├── CoreferenceResolver.java │ │ └── WordTagBean.java │ ├── dto │ │ └── AnsConfRefBean.java │ ├── ne │ │ ├── NamedEntityTest.java │ │ └── NamedEntityTrain.java │ ├── nlp │ │ ├── NLPFactory.java │ │ ├── NLPModels.java │ │ ├── NLPUtil.java │ │ ├── POSTag.java │ │ ├── POSTagger.java │ │ ├── POSTaggerTest.java │ │ ├── dc │ │ │ ├── DocumentCategorizer.java │ │ │ ├── DocumentCategorizerTrain.java │ │ │ └── DocumentCategory.java │ │ └── exceptions │ │ │ ├── CategoryNotComposableException.java │ │ │ └── ContentUnavailableException.java │ ├── solr │ │ └── SOLRUtil.java │ ├── test │ │ ├── TestCases.java │ │ ├── TestDeepQA.java │ │ ├── TestNLP.java │ │ └── TrainUtil.java │ └── wordnet │ │ ├── .DS_Store │ │ ├── WordNetTest.java │ │ └── WordNetUtil.java │ └── log4j.properties ├── DeepQARService ├── .DS_Store ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ └── org.eclipse.wst.jsdt.ui.superType.name ├── WebContent │ ├── META-INF │ │ └── MANIFEST.MF │ └── WEB-INF │ │ └── web.xml └── src │ └── deepqa │ └── rest │ ├── bean │ └── AnswerBean.java │ └── service │ └── QAService.java ├── DeepQASupport ├── .gitignore ├── .project ├── WordNet-3.0 │ ├── AUTHORS │ ├── COPYING │ ├── INSTALL │ ├── LICENSE │ ├── README │ ├── dict │ │ ├── adj.exc │ │ ├── adv.exc │ │ ├── cntlist │ │ ├── cntlist.rev │ │ ├── frames.vrb │ │ ├── lexnames │ │ ├── log.grind.3.0 │ │ ├── noun.exc │ │ ├── sentidx.vrb │ │ ├── sents.vrb │ │ ├── verb.Framestext │ │ └── verb.exc │ ├── doc │ │ ├── html │ │ │ ├── binsrch.3WN.html │ │ │ ├── cntlist.5WN.html │ │ │ ├── grind.1WN.html │ │ │ ├── lexnames.5WN.html │ │ │ ├── morph.3WN.html │ │ │ ├── morphy.7WN.html │ │ │ ├── prologdb.5WN.html │ │ │ ├── senseidx.5WN.html │ │ │ ├── uniqbeg.7WN.html │ │ │ ├── wn.1WN.html │ │ │ ├── wnb.1WN.html │ │ │ ├── wndb.5WN.html │ │ │ ├── wngloss.7WN.html │ │ │ ├── wngroups.7WN.html │ │ │ ├── wninput.5WN.html │ │ │ ├── wnintro.1WN.html │ │ │ ├── wnintro.3WN.html │ │ │ ├── wnintro.5WN.html │ │ │ ├── wnintro.7WN.html │ │ │ ├── wnlicens.7WN.html │ │ │ ├── wnpkgs.7WN.html │ │ │ ├── wnsearch.3WN.html │ │ │ ├── wnstats.7WN.html │ │ │ └── wnutil.3WN.html │ │ ├── man │ │ │ ├── binsrch.3 │ │ │ ├── cntlist.5 │ │ │ ├── grind.1 │ │ │ ├── lexnames.5 │ │ │ ├── morph.3 │ │ │ ├── morphy.7 │ │ │ ├── prologdb.5 │ │ │ ├── senseidx.5 │ │ │ ├── uniqbeg.7 │ │ │ ├── wn.1 │ │ │ ├── wnb.1 │ │ │ ├── wndb.5 │ │ │ ├── wngloss.7 │ │ │ ├── wngroups.7 │ │ │ ├── wninput.5 │ │ │ ├── wnintro.1 │ │ │ ├── wnintro.3 │ │ │ ├── wnintro.5 │ │ │ ├── wnintro.7 │ │ │ ├── wnlicens.7 │ │ │ ├── wnpkgs.7 │ │ │ ├── wnsearch.3 │ │ │ ├── wnstats.7 │ │ │ └── wnutil.3 │ │ ├── pdf │ │ │ ├── Makefile.am │ │ │ ├── binsrch.3.pdf │ │ │ ├── cntlist.5.pdf │ │ │ ├── grind.1.pdf │ │ │ ├── lexnames.5.pdf │ │ │ ├── morph.3.pdf │ │ │ ├── morphy.7.pdf │ │ │ ├── prologdb.5.pdf │ │ │ ├── senseidx.5.pdf │ │ │ ├── uniqbeg.7.pdf │ │ │ ├── wn.1.pdf │ │ │ ├── wnb.1.pdf │ │ │ ├── wndb.5.pdf │ │ │ ├── wngloss.7.pdf │ │ │ ├── wngroups.7.pdf │ │ │ ├── wninput.5.pdf │ │ │ ├── wnintro.1.pdf │ │ │ ├── wnintro.3.pdf │ │ │ ├── wnintro.5.pdf │ │ │ ├── wnintro.7.pdf │ │ │ ├── wnlicens.7.pdf │ │ │ ├── wnpkgs.7.pdf │ │ │ ├── wnsearch.3.pdf │ │ │ ├── wnstats.7.pdf │ │ │ └── wnutil.3.pdf │ │ └── ps │ │ │ ├── Makefile.am │ │ │ ├── binsrch.3.ps │ │ │ ├── cntlist.5.ps │ │ │ ├── grind.1.ps │ │ │ ├── lexnames.5.ps │ │ │ ├── morph.3.ps │ │ │ ├── morphy.7.ps │ │ │ ├── prologdb.5.ps │ │ │ ├── senseidx.5.ps │ │ │ ├── uniqbeg.7.ps │ │ │ ├── wn.1.ps │ │ │ ├── wnb.1.ps │ │ │ ├── wndb.5.ps │ │ │ ├── wngloss.7.ps │ │ │ ├── wngroups.7.ps │ │ │ ├── wninput.5.ps │ │ │ ├── wnintro.1.ps │ │ │ ├── wnintro.3.ps │ │ │ ├── wnintro.5.ps │ │ │ ├── wnintro.7.ps │ │ │ ├── wnlicens.7.ps │ │ │ ├── wnpkgs.7.ps │ │ │ ├── wnsearch.3.ps │ │ │ ├── wnstats.7.ps │ │ │ └── wnutil.3.ps │ ├── include │ │ ├── tk │ │ │ ├── tk.h │ │ │ └── tkDecls.h │ │ ├── wn.h │ │ └── wngrind.h │ ├── lib │ │ ├── binsrch.c │ │ ├── morph.c │ │ ├── search.c │ │ ├── wnglobal.c │ │ ├── wnhelp.c │ │ ├── wnres │ │ │ ├── license.txt │ │ │ ├── wn.xbm │ │ │ ├── wnb.man │ │ │ └── wngloss.man │ │ ├── wnrtl.c │ │ └── wnutil.c │ └── src │ │ ├── stubs.c │ │ ├── tkAppInit.c │ │ ├── wn.c │ │ └── wnb ├── data │ ├── en-category.train │ └── stopwords.txt ├── jars_lucene_solr_complete │ ├── ant-1.8.2.jar │ ├── commons-io-2.3.jar │ ├── httpclient-4.3.1.jar │ ├── httpcore-4.3.jar │ ├── httpmime-4.3.1.jar │ ├── junit-4.10.jar │ ├── junit4-ant-2.1.3.jar │ ├── lucene-analyzers-common-4.9.0.jar │ ├── lucene-analyzers-icu-4.9.0.jar │ ├── lucene-analyzers-kuromoji-4.9.0.jar │ ├── lucene-analyzers-morfologik-4.9.0.jar │ ├── lucene-analyzers-phonetic-4.9.0.jar │ ├── lucene-analyzers-smartcn-4.9.0.jar │ ├── lucene-analyzers-stempel-4.9.0.jar │ ├── lucene-analyzers-uima-4.9.0.jar │ ├── lucene-codecs-4.9.0.jar │ ├── lucene-core-4.9.0.jar │ ├── lucene-expressions-4.9.0.jar │ ├── lucene-grouping-4.9.0.jar │ ├── lucene-highlighter-4.9.0.jar │ ├── lucene-join-4.9.0.jar │ ├── lucene-memory-4.9.0.jar │ ├── lucene-misc-4.9.0.jar │ ├── lucene-queries-4.9.0.jar │ ├── lucene-queryparser-4.9.0.jar │ ├── lucene-spatial-4.9.0.jar │ ├── lucene-suggest-4.9.0.jar │ ├── lucene-test-framework-4.9.0.jar │ ├── noggit-0.5.jar │ ├── post.jar │ ├── randomizedtesting-runner-2.1.3.jar │ ├── slf4j-api-1.7.6.jar │ ├── solr-analysis-extras-4.9.0.jar │ ├── solr-cell-4.9.0.jar │ ├── solr-clustering-4.9.0.jar │ ├── solr-core-4.9.0.jar │ ├── solr-dataimporthandler-4.9.0.jar │ ├── solr-dataimporthandler-extras-4.9.0.jar │ ├── solr-langid-4.9.0.jar │ ├── solr-map-reduce-4.9.0.jar │ ├── solr-morphlines-cell-4.9.0.jar │ ├── solr-morphlines-core-4.9.0.jar │ ├── solr-solrj-4.9.0.jar │ ├── solr-test-framework-4.9.0.jar │ ├── solr-uima-4.9.0.jar │ ├── solr-velocity-4.9.0.jar │ ├── wstx-asl-3.2.7.jar │ └── zookeeper-3.4.6.jar ├── jars_opennlp_wordnet │ ├── .DS_Store │ ├── commons-codec-1.6.jar │ ├── commons-io-2.3.jar │ ├── commons-lang3-3.3.2.jar │ ├── commons-logging-1.1.3.jar │ ├── httpclient-4.3.1.jar │ ├── httpcore-4.3.jar │ ├── httpmime-4.3.1.jar │ ├── jaws-bin.jar │ ├── jwnl-1.3.3.jar │ ├── noggit-0.5.jar │ ├── opennlp-maxent-3.0.3.jar │ ├── opennlp-tools-1.5.3.jar │ ├── opennlp-uima-1.5.3.jar │ ├── slf4j-api-1.7.6.jar │ ├── slf4j-simple-1.7.7.jar │ ├── wstx-asl-3.2.7.jar │ └── zookeeper-3.4.6.jar ├── jars_others │ └── log4j-1.2.17.jar └── opennlp_models │ ├── .DS_Store │ ├── en-answer.bin │ ├── en-category.bin │ ├── en-category.bin.cpgz │ ├── en-chunker.bin │ ├── en-ner-date.bin │ ├── en-ner-location.bin │ ├── en-ner-money.bin │ ├── en-ner-organization.bin │ ├── en-ner-percentage.bin │ ├── en-ner-person.bin │ ├── en-ner-time.bin │ ├── en-parser-chunking.bin │ ├── en-pos-maxent.bin │ ├── en-pos-perceptron.bin │ ├── en-sent.bin │ └── en-token.bin ├── SimilarityUtils ├── .DS_Store ├── .classpath ├── .project ├── bin │ ├── .gitignore │ ├── domain_independent.txt │ ├── gov │ │ └── nist │ │ │ └── msi │ │ │ └── ssmpi │ │ │ └── similarity │ │ │ ├── StringSimilarity.class │ │ │ ├── impl │ │ │ ├── AbstractSchemaSimilarityByWordNet.class │ │ │ ├── SSTop_Cosine.class │ │ │ ├── SSTop_CosineTest.class │ │ │ ├── SSTop_ICofWN.class │ │ │ ├── SSTop_Jaccard.class │ │ │ ├── SSTop_WN_Cosine.class │ │ │ ├── SSTop_WN_IC_Cosine.class │ │ │ └── SSTop_WN_Jaccard.class │ │ │ ├── similaritymetrics │ │ │ ├── CosineSimilarity2.class │ │ │ └── JaccardSimilarity2.class │ │ │ └── utils │ │ │ ├── WordInformationContents.class │ │ │ └── WordStringUtils.class │ ├── ic-bnc-resnik-add1.dat │ └── wordnet.xml ├── lib │ ├── JWordNetSim.jar │ ├── commons-logging-1.1.1.jar │ ├── edu.mit.jwi_1.1.2_jdk.jar │ ├── javawordnetsim.jar │ ├── jwnl.jar │ └── simmetrics.jar ├── src │ └── gov │ │ └── nist │ │ └── msi │ │ └── ssmpi │ │ └── similarity │ │ ├── StringSimilarity.java │ │ ├── impl │ │ ├── AbstractSchemaSimilarityByWordNet.java │ │ ├── SSTop_Cosine.java │ │ ├── SSTop_ICofWN.java │ │ ├── SSTop_Jaccard.java │ │ ├── SSTop_WN_Cosine.java │ │ ├── SSTop_WN_IC_Cosine.java │ │ └── SSTop_WN_Jaccard.java │ │ ├── similaritymetrics │ │ ├── CosineSimilarity2.java │ │ └── JaccardSimilarity2.java │ │ └── utils │ │ ├── WordInformationContents.java │ │ └── WordStringUtils.java └── test │ ├── domain_independent.txt │ ├── gov │ └── nist │ │ └── msi │ │ └── ssmpi │ │ └── similarity │ │ └── impl │ │ └── SSTop_CosineTest.java │ ├── ic-bnc-resnik-add1.dat │ └── wordnet.xml └── SolrCommons ├── .DS_Store ├── .classpath ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── bin ├── .gitignore ├── com │ └── solr │ │ └── opennlp │ │ └── util │ │ └── OpenNLPUtil.class └── nf │ └── solr │ └── test │ └── TamingTextTestJ4.class └── src ├── com └── solr │ └── opennlp │ └── util │ └── OpenNLPUtil.java └── nf └── solr └── test └── TamingTextTestJ4.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 12 | hs_err_pid* 13 | -------------------------------------------------------------------------------- /DeepQA/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQA/.DS_Store -------------------------------------------------------------------------------- /DeepQA/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeepQA/.gitignore: -------------------------------------------------------------------------------- 1 | .class 2 | /bin/ 3 | -------------------------------------------------------------------------------- /DeepQA/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DeepQA 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /DeepQA/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.7 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.7 13 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/CategorizeQue.java: -------------------------------------------------------------------------------- 1 | package deepqa; 2 | 3 | import java.io.IOException; 4 | 5 | import opennlp.tools.util.InvalidFormatException; 6 | import deepqa.nlp.dc.DocumentCategorizer; 7 | import deepqa.nlp.exceptions.CategoryNotComposableException; 8 | 9 | 10 | public class CategorizeQue { 11 | 12 | public static String getQuestionCategory(String question) throws InvalidFormatException, IOException, CategoryNotComposableException{ 13 | String questionCategory = DocumentCategorizer.getQuestionCategory(question); 14 | return questionCategory; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/InitiateQue.java: -------------------------------------------------------------------------------- 1 | package deepqa; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.IOException; 5 | import java.io.InputStreamReader; 6 | 7 | import org.apache.log4j.Logger; 8 | 9 | public class InitiateQue { 10 | 11 | final static Logger LOGGER = Logger.getLogger(InitiateQue.class); 12 | 13 | public static String askQuestion() throws IOException{ 14 | BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 15 | LOGGER.debug("Ask Question:"); 16 | String question = null; 17 | try { 18 | question = br.readLine().replaceAll("[();\"'.,]?", ""); 19 | }finally { 20 | //br.close(); //System.in should't be closed as it's used again 21 | } 22 | return question; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/constants/Constants.java: -------------------------------------------------------------------------------- 1 | package deepqa.constants; 2 | 3 | public class Constants { 4 | public static final String SOLR_URL = "http://localhost:8983/solr/testCollection/"; 5 | public static final String WORDNET_LOC = "/Users/914957/Documents/DeepQA/DeepQASupport/WordNet-3.0/"; 6 | public static final String WORDNET_DIC_LOC = "/Users/914957/Documents/DeepQA/DeepQASupport/WordNet-3.0/dict/"; 7 | public static final String MODEL_LOC = "/Users/914957/Documents/DeepQA/DeepQASupport/opennlp_models/"; 8 | public static final String MODEL_TRAIN_LOC = "/Users/914957/Documents/DeepQA/DeepQASupport/data/"; 9 | public static final String STOPWORDS_LOC = "/Users/914957/Documents/DeepQA/DeepQASupport/data/"; 10 | } 11 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/cr/WordTagBean.java: -------------------------------------------------------------------------------- 1 | package deepqa.cr; 2 | public class WordTagBean { 3 | private String[] words; 4 | private String[] tags; 5 | 6 | public String[] getWords() { 7 | return words; 8 | } 9 | 10 | public void setWords(String[] words) { 11 | this.words = words; 12 | } 13 | 14 | public String[] getTags() { 15 | return tags; 16 | } 17 | 18 | public void setTags(String[] tags) { 19 | this.tags = tags; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/dto/AnsConfRefBean.java: -------------------------------------------------------------------------------- 1 | package deepqa.dto; 2 | 3 | import java.util.Map; 4 | import java.util.TreeMap; 5 | 6 | public class AnsConfRefBean { 7 | private Map ansWithSentence; 8 | private TreeMap ansWithConf; 9 | public Map getAnsWithSentence() { 10 | return ansWithSentence; 11 | } 12 | public void setAnsWithSentence(Map ansWithSentence) { 13 | this.ansWithSentence = ansWithSentence; 14 | } 15 | public TreeMap getAnsWithConf() { 16 | return ansWithConf; 17 | } 18 | public void setAnsWithConf(TreeMap ansWithConf) { 19 | this.ansWithConf = ansWithConf; 20 | } 21 | @Override 22 | public String toString() { 23 | return "AnsConfRefBean [ansWithSentence=" + ansWithSentence 24 | + ", ansWithConf=" + ansWithConf + "]"; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/ne/NamedEntityTest.java: -------------------------------------------------------------------------------- 1 | package deepqa.ne; 2 | 3 | //Test a custom OpenNLP model for NER of book titles 4 | //See https://gist.github.com/johnmiedema/4020deea875ce306971e 5 | 6 | import java.io.FileInputStream; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | 10 | import opennlp.tools.namefind.NameFinderME; 11 | import opennlp.tools.namefind.TokenNameFinderModel; 12 | import opennlp.tools.tokenize.Tokenizer; 13 | import opennlp.tools.tokenize.TokenizerME; 14 | import opennlp.tools.tokenize.TokenizerModel; 15 | import opennlp.tools.util.Span; 16 | import deepqa.constants.Constants; 17 | 18 | public class NamedEntityTest { 19 | 20 | //1. Test sentences that do not exist in training data 21 | // static String sentence = "During his first two years in office test"; 22 | 23 | //2. More complex sentence structure 24 | // static String sentence = "What is the setting of Fyodor Dostoyevsky's novel Crime and Punishment?"; 25 | 26 | //3. Title in quotes 27 | //static String sentence = "Who wrote \"Reading in the Brain?\""; 28 | 29 | //4. Title at beginning of the sentence 30 | static String sentence = "When Disney was 16, he dropped out of school"; 31 | 32 | //5. Mess around with case of title 33 | //static String sentence = "Who is the author of the Call of the Wild?"; 34 | 35 | //6. All lower case 36 | //static String sentence = "Who is the author of the call of the wild?"; 37 | 38 | //7. "the" is a different part of speech 39 | //static String sentence = "Who is the author of the Odyssey?"; 40 | 41 | public static void main(String[] args) { 42 | 43 | InputStream modelInToken = null; 44 | InputStream modelIn = null; 45 | 46 | try { 47 | 48 | //convert sentence into tokens 49 | modelInToken = new FileInputStream(Constants.MODEL_LOC+"en-token.bin"); 50 | TokenizerModel modelToken = new TokenizerModel(modelInToken); 51 | Tokenizer tokenizer = new TokenizerME(modelToken); 52 | String tokens[] = tokenizer.tokenize(sentence); 53 | System.out.println(tokens.length); 54 | //load custom titles model 55 | modelIn = new FileInputStream(Constants.MODEL_LOC+"en-ner-occupation.bin"); 56 | 57 | 58 | 59 | //create NameFinder and call find method 60 | TokenNameFinderModel model = new TokenNameFinderModel(modelIn); 61 | NameFinderME nameFinder = new NameFinderME(model); 62 | Span nameSpans[] = nameFinder.find(tokens); 63 | System.out.println(nameSpans.length); 64 | 65 | //find probabilities for names 66 | double[] spanProbs = nameFinder.probs(nameSpans); 67 | 68 | //print titles with probabilities 69 | for( int i = 0; i and tags 21 | //one sentence per line 22 | File inFile = new File(Constants.MODEL_LOC+"en-ner-"+modelName+".train"); 23 | 24 | //create NameSampleDataStream 25 | //converts tagged strings from trained data into NameSample objects 26 | //populated in next step 27 | 28 | NameSampleDataStream nss = null; 29 | try { 30 | nss = new NameSampleDataStream( 31 | new PlainTextByLineStream( 32 | new java.io.FileReader(inFile))); 33 | 34 | } 35 | catch (Exception ex) { 36 | System.out.println(ex.getMessage()); 37 | } 38 | 39 | //create "title" model 40 | 41 | TokenNameFinderModel model = null; 42 | int iterations = 1000; 43 | int cutoff = 5; 44 | 45 | try { 46 | model = NameFinderME.train( 47 | "en", //language of the training data (relevant to tokenization) 48 | modelName, //type of model 49 | nss, //the NameSample collection, created above 50 | (AdaptiveFeatureGenerator) null, //null=use default set of feature generators for NE detection 51 | Collections.emptyMap(), //empty, not adding additional resources to the model 52 | iterations, //number of iterations before the model outputs, not important 53 | cutoff); //lower bound for the number of times a feature exists before it is included in the model 54 | } 55 | catch (Exception ex) { 56 | System.out.println(ex.getMessage()); 57 | } 58 | 59 | //save the model to disk 60 | //used in testing and production 61 | 62 | File outFile = null; 63 | try { 64 | outFile = new File(Constants.MODEL_LOC+"en-ner-"+modelName+".bin"); 65 | FileOutputStream outFileStream = new FileOutputStream(outFile); 66 | model.serialize(outFileStream); 67 | outFileStream.flush(); 68 | outFileStream.close(); 69 | nss.close(); 70 | } 71 | catch (Exception ex) { 72 | System.out.println(ex.getMessage()); 73 | } 74 | } 75 | 76 | public static void main(String[] args) { 77 | trainModel("occupation"); 78 | // trainModel("number"); 79 | // trainModel("location"); 80 | // trainModel("money"); 81 | // trainModel("organization"); 82 | // trainModel("percentage"); 83 | //trainModel("date"); 84 | } 85 | } -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/NLPModels.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp; 2 | 3 | public enum NLPModels { 4 | location("location"), organization("organization"), date("date"), money("money"), 5 | number("number"), occupation("occupation"), percentage("percentage"), person("person"), 6 | time("time"); 7 | 8 | private String name; 9 | 10 | private NLPModels(String name) { 11 | this.name = name; 12 | } 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/POSTag.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | /** 8 | * Parts of speech tags that we are concered about. 9 | * @author admin 10 | * 11 | */ 12 | public enum POSTag { 13 | NN, 14 | NNS, 15 | NNP, 16 | NNPS, 17 | PDT, 18 | POS, 19 | PRP, 20 | PRP$, 21 | JJR, 22 | JJ, 23 | JJS, 24 | VB, 25 | VBD, 26 | VBG, 27 | VBN, 28 | VBP, 29 | VBZ; 30 | 31 | public static List valuesAsStr(){ 32 | List tagsAsStr = new ArrayList(); 33 | List tags = Arrays.asList(POSTag.values()); 34 | for(POSTag tag:tags){ 35 | tagsAsStr.add(tag.name()); 36 | } 37 | return tagsAsStr; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/POSTagger.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp; 2 | 3 | import java.io.IOException; 4 | import java.io.StringReader; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | import opennlp.tools.postag.POSSample; 10 | import opennlp.tools.postag.POSTaggerME; 11 | import opennlp.tools.tokenize.WhitespaceTokenizer; 12 | import opennlp.tools.util.ObjectStream; 13 | import opennlp.tools.util.PlainTextByLineStream; 14 | 15 | import org.apache.log4j.Logger; 16 | 17 | public class POSTagger { 18 | 19 | final static Logger LOGGER = Logger.getLogger(POSTagger.class); 20 | 21 | public static Map tagPOS(String sentence) throws IOException { 22 | 23 | Map taggedTokens = new HashMap(); 24 | 25 | // Load only the needed POS tags as string 26 | List posTags = POSTag.valuesAsStr(); 27 | LOGGER.debug("Selected Tags: "+posTags); 28 | 29 | 30 | // PerformanceMonitor perfMon = new PerformanceMonitor(System.err,"sent"); 31 | 32 | POSTaggerME tagger = NLPFactory.createTaggger(); 33 | 34 | ObjectStream lineStream = new PlainTextByLineStream( 35 | new StringReader(sentence)); 36 | 37 | // perfMon.start(); 38 | 39 | // reading questions line by line - though in our case there is only one question 40 | String line; 41 | while ((line = lineStream.read()) != null) { 42 | 43 | // word tokens 44 | String whitespaceTokenizerLine[] = WhitespaceTokenizer.INSTANCE 45 | .tokenize(line); 46 | 47 | String[] tags = tagger.tag(whitespaceTokenizerLine); 48 | LOGGER.debug("Tagged Tokens:" + new POSSample(whitespaceTokenizerLine, tags)); 49 | for (int tagCounter = 0; tagCounter < tags.length; tagCounter++) { 50 | if (posTags.contains(tags[tagCounter])) { 51 | taggedTokens.put(whitespaceTokenizerLine[tagCounter], tags[tagCounter]); 52 | } 53 | } 54 | // perfMon.incrementCounter(); 55 | } 56 | lineStream.close(); 57 | // perfMon.stopAndPrintFinalResult(); 58 | return taggedTokens; 59 | 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/POSTaggerTest.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp; 2 | 3 | import java.io.IOException; 4 | 5 | public class POSTaggerTest { 6 | public static void main(String[] args) throws IOException { 7 | System.out.println(POSTagger.tagPOS("Where is John living")); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/dc/DocumentCategorizer.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp.dc; 2 | 3 | import java.io.FileInputStream; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | import java.util.ArrayList; 7 | import java.util.Arrays; 8 | import java.util.List; 9 | 10 | import org.apache.log4j.Logger; 11 | 12 | import opennlp.tools.doccat.DoccatModel; 13 | import opennlp.tools.doccat.DocumentCategorizerME; 14 | import opennlp.tools.util.InvalidFormatException; 15 | import deepqa.constants.Constants; 16 | import deepqa.nlp.NLPFactory; 17 | import deepqa.nlp.exceptions.CategoryNotComposableException; 18 | 19 | public class DocumentCategorizer { 20 | 21 | final static Logger LOGGER = Logger.getLogger(DocumentCategorizer.class); 22 | 23 | /** 24 | * Main method is for testing purpose 25 | * @param args 26 | * @throws InvalidFormatException 27 | * @throws IOException 28 | */ 29 | public static void main(String[] args) throws InvalidFormatException, IOException { 30 | 31 | InputStream is = new FileInputStream(Constants.MODEL_LOC + "en-category.bin"); 32 | DoccatModel m = new DoccatModel(is); 33 | String inputText = "Where was the last?"; 34 | DocumentCategorizerME myCategorizer = new DocumentCategorizerME(m); 35 | double[] outcomes = myCategorizer.categorize(inputText); 36 | for (double d : outcomes) { 37 | LOGGER.debug(d); 38 | } 39 | int category = myCategorizer.getNumberOfCategories(); 40 | LOGGER.debug(category); 41 | LOGGER.debug(myCategorizer.getBestCategory(outcomes)); 42 | } 43 | 44 | public static String getQuestionCategory(String inputText) throws CategoryNotComposableException { 45 | DocumentCategorizerME myCategorizer = NLPFactory.createCategorizer(); 46 | double[] outcomes = myCategorizer.categorize(inputText); 47 | 48 | String category = myCategorizer.getBestCategory(outcomes); 49 | LOGGER.debug("Category formulated: "+category); 50 | 51 | //for cateogries W, B, X we substitute it to other categories since 52 | //i dont have for those 53 | 54 | //translation is straight forward: and doesn't use any NLP principles 55 | if(specialCategories.contains(category)){ 56 | //find the question type - old style 57 | List input = Arrays.asList(inputText.toLowerCase().split(" ")); 58 | QuestionType[] questionTypes = QuestionType.values(); 59 | for(QuestionType questionType: questionTypes){ 60 | if(input.contains(questionType.toString())){ 61 | return questionType.getCategory(); 62 | } 63 | } 64 | //if it reaches here it means the category was not able to be formulated 65 | throw new CategoryNotComposableException(); 66 | } 67 | 68 | return category; 69 | } 70 | 71 | static List specialCategories = new ArrayList(); 72 | static { 73 | specialCategories.add("W"); 74 | specialCategories.add("B"); 75 | specialCategories.add("X"); 76 | } 77 | 78 | enum QuestionType { 79 | where("L"), 80 | when("T"), 81 | who("P"); 82 | private String type; 83 | QuestionType(String type){ 84 | this.type = type; 85 | } 86 | public String getCategory(){ 87 | return this.type; 88 | } 89 | } 90 | 91 | 92 | } 93 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/dc/DocumentCategorizerTrain.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp.dc; 2 | 3 | import java.io.BufferedOutputStream; 4 | import java.io.FileInputStream; 5 | import java.io.FileOutputStream; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.io.OutputStream; 9 | 10 | import opennlp.tools.doccat.DoccatModel; 11 | import opennlp.tools.doccat.DocumentCategorizerME; 12 | import opennlp.tools.doccat.DocumentSample; 13 | import opennlp.tools.doccat.DocumentSampleStream; 14 | import opennlp.tools.util.ObjectStream; 15 | import opennlp.tools.util.PlainTextByLineStream; 16 | import deepqa.constants.Constants; 17 | 18 | public class DocumentCategorizerTrain { 19 | 20 | /** 21 | * @param args 22 | */ 23 | public static void main(String[] args) { 24 | DoccatModel model = null; 25 | 26 | InputStream dataIn = null; 27 | try { 28 | dataIn = new FileInputStream(Constants.MODEL_TRAIN_LOC + "en-category.train"); 29 | ObjectStream lineStream = 30 | new PlainTextByLineStream(dataIn, "UTF-8"); 31 | ObjectStream sampleStream = new DocumentSampleStream(lineStream); 32 | 33 | model = DocumentCategorizerME.train("en", sampleStream); 34 | } 35 | catch (IOException e) { 36 | // Failed to read or parse training data, training failed 37 | e.printStackTrace(); 38 | } 39 | finally { 40 | if (dataIn != null) { 41 | try { 42 | dataIn.close(); 43 | } 44 | catch (IOException e) { 45 | // Not an issue, training already finished. 46 | // The exception should be logged and investigated 47 | // if part of a production system. 48 | e.printStackTrace(); 49 | } 50 | } 51 | } 52 | 53 | OutputStream modelOut = null; 54 | try { 55 | modelOut = new BufferedOutputStream(new FileOutputStream(Constants.MODEL_LOC+"en-category.bin")); 56 | model.serialize(modelOut); 57 | } 58 | catch (IOException e) { 59 | // Failed to save model 60 | e.printStackTrace(); 61 | } 62 | finally { 63 | if (modelOut != null) { 64 | try { 65 | modelOut.close(); 66 | } 67 | catch (IOException e) { 68 | // Failed to correctly save model. 69 | // Written model might be invalid. 70 | e.printStackTrace(); 71 | } 72 | } 73 | } 74 | 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/dc/DocumentCategory.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp.dc; 2 | 3 | public enum DocumentCategory { 4 | P("person"), //pre-exits 5 | L("location"), //pre-exits 6 | T("date"), //pre-exits 7 | O("organization"), //pre-exits 8 | R("time"), //pre-exits 9 | M("money"), //pre-exits 10 | C("percentage"),//pre-exits 11 | A("number"), //amount 12 | D("distance"), 13 | F("person"), //description 14 | W("title"), 15 | B("definition"), 16 | Y("number"), 17 | X("occupation"); //others 18 | 19 | private String type; 20 | 21 | DocumentCategory(String type){ 22 | this.type =type; 23 | } 24 | 25 | public String getCategory(){ 26 | return this.type; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/exceptions/CategoryNotComposableException.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp.exceptions; 2 | 3 | public class CategoryNotComposableException extends Exception { 4 | 5 | private static final long serialVersionUID = -61925240487416770L; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/nlp/exceptions/ContentUnavailableException.java: -------------------------------------------------------------------------------- 1 | package deepqa.nlp.exceptions; 2 | 3 | public class ContentUnavailableException extends Exception { 4 | 5 | private static final long serialVersionUID = 7566024462054066071L; 6 | } 7 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/test/TestCases.java: -------------------------------------------------------------------------------- 1 | package deepqa.test; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.FileWriter; 5 | import java.io.IOException; 6 | import java.io.InputStreamReader; 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | import java.util.Map.Entry; 10 | 11 | import opennlp.tools.util.InvalidFormatException; 12 | 13 | import org.apache.solr.client.solrj.SolrServerException; 14 | 15 | public class TestCases { 16 | 17 | static FileWriter fw = null; 18 | 19 | public static void main(String[] args) throws IOException{ 20 | fw = new FileWriter("testResults2.txt", true); 21 | 22 | Map questionAnswers = new HashMap(); 23 | //set 1 24 | //check this 25 | questionAnswers.put("When was Bill Gates born", 26 | "Bill Gates was born William Henry Gates III on October 28, 1955, in Seattle, Washington."); 27 | questionAnswers.put("When did Bill Gates graduate", 28 | "Bill Gates graduated from Lakeside in 1973."); 29 | questionAnswers.put("Who is Bill Gates college friend", 30 | "It was at Lakeside School where Bill met Paul Allen, who was two years his senior. The two became fast friends"); 31 | questionAnswers.put("When did Lincoln give his second Inaugural Address", 32 | "Instead, he gave it momentum in his fiery second Inaugural Address of March 1865."); 33 | questionAnswers.put("Who is Lincoln mother", 34 | "On the other hand, Lincoln's mother, Nancy Hanks, was the flower of his heart."); 35 | questionAnswers.put("When did Lincoln enter politics", 36 | "When he entered politics in his bid for the Illinois state assembly in 1834,"); 37 | questionAnswers.put("Where did Bill Gates work", 38 | "Bill Gates was glad to be home again in the Pacific Northwest, and threw himself into his work."); 39 | questionAnswers.put("When was Walt Disney born", 40 | "Walter Elias \"Walt\" Disney was born on December 5, 1901, in the Hermosa section of Chicago, Illinois"); 41 | questionAnswers.put("When was the new Walt Disney Studio opened", 42 | "In December 1939, a new campus for Walt Disney Studios was opened in Burbank."); 43 | 44 | //set 2 45 | questionAnswers.put("At what age did Disney drop out of school", 46 | "When Disney was 16, he dropped out of school to join the army but was rejected for being underage"); 47 | //TODO : check this 48 | questionAnswers.put("How much is Disneyland", 49 | "picture Mary Poppins, which mixed live action and animation. Disney's $17 million Disneyland theme park opened in 1955."); 50 | questionAnswers.put("When did Disney die", 51 | "It was still under construction when, in 1966, Disney was diagnosed with lung cancer. He died on December 15, 1966, at the age of 65."); 52 | questionAnswers.put("When was Jeff Bezos born", 53 | "Jeff Bezos was born on January 12, 1964, in Albuquerque, New Mexico, to a teenage mother, Jacklyn Gise Jorgensen, and his biological father, Ted Jorgensen."); 54 | questionAnswers.put("Where was Jeff Bezos born", 55 | "Jeff Bezos was born on January 12, 1964, in Albuquerque, New Mexico, to a teenage mother, Jacklyn Gise Jorgensen, and his biological father, Ted Jorgensen."); 56 | questionAnswers.put("In which college did Jeff Bezos graduate", 57 | "Bezos pursued his interest in computers at Princeton University, where he graduated summa cum laude in 1986 with a degree in"); 58 | questionAnswers.put("How many friends beta tested the site", 59 | "and eventually developed a test site. After inviting 300 friends to beta test the site, Bezos opened Amazon.com, named after the meandering South American River, on July 16, 1995."); 60 | questionAnswers.put("When did Cook join as chief operating officer", 61 | "Following a 12-year career at IBM, in 1994, Cook became a chief operating officer (Reseller Division) at Intelligent Electronics."); 62 | questionAnswers.put("When was Steven Paul Jobs born", 63 | "Steven Paul Jobs was born on February 24, 1955, in San Francisco, California, to Joanne Schieble (later Joanne Simpson) and Abdulfattah \"John\" Jandali, t"); 64 | questionAnswers.put("When did Nobel discover nitroglycerin", 65 | "In 1863 he succeeded in exploding nitroglycerin from a distance with a gunpowder charge, and two years later he patented the mercury ful"); 66 | questionAnswers.put("When did Nobel establish Nobel Prize", 67 | "During November 1895, at the Swedish-Norwegian Club in Paris, Nobel signed his last will and testament and established the Nobel Prizes, to be awarded annually without distinction of nationality."); 68 | 69 | for (Entry mapEntry : questionAnswers.entrySet()) { 70 | 71 | TestDeepQA.askMe(mapEntry.getKey(), mapEntry.getValue()); 72 | 73 | } 74 | fw.flush(); 75 | fw.close(); 76 | } 77 | 78 | public static void log(String line) throws IOException{ 79 | fw.write("\n" + line);// appends the string to the file 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/test/TrainUtil.java: -------------------------------------------------------------------------------- 1 | package deepqa.test; 2 | 3 | import java.io.FileWriter; 4 | import java.io.IOException; 5 | import java.util.Scanner; 6 | 7 | import deepqa.ne.NamedEntityTrain; 8 | import deepqa.nlp.dc.DocumentCategory; 9 | 10 | public class TrainUtil { 11 | public static void retrainModel(String questionCategory) { 12 | String selectedModel = DocumentCategory.valueOf(questionCategory).getCategory(); 13 | String lineToAdd; 14 | Scanner scanIn = new Scanner(System.in); 15 | System.out.println("Enter line:"); 16 | lineToAdd = scanIn.nextLine(); 17 | scanIn.close(); 18 | 19 | boolean status = trainModel(selectedModel, lineToAdd); 20 | System.out.println("Training status: "+(status?"success":"failed")); 21 | 22 | } 23 | 24 | public static boolean trainModel(String selectedModel, String line) { 25 | 26 | String modelFileName = ""; 27 | System.out.println("selectedModel: "+selectedModel); 28 | switch (selectedModel) { 29 | case "person": 30 | modelFileName = "en-ner-person.train"; 31 | break; 32 | case "occupation": 33 | modelFileName = "en-ner-occupation.train"; 34 | break; 35 | case "number": 36 | modelFileName = "en-ner-number.train"; 37 | break; 38 | case "location": 39 | modelFileName = "en-ner-location.train"; 40 | break; 41 | case "date": 42 | modelFileName = "en-ner-date.train"; 43 | break; 44 | default: 45 | System.out.println("Model not found"); 46 | return false; 47 | 48 | } 49 | addToTrainFile(modelFileName, line); 50 | NamedEntityTrain.trainModel(selectedModel); 51 | 52 | return true; 53 | } 54 | 55 | public static void addToTrainFile(String modelFileName, String line) { 56 | try { 57 | System.out.println(modelFileName); 58 | FileWriter fw = new FileWriter(modelFileName, true); 59 | fw.write("\n" + line);// appends the string to the file 60 | fw.flush(); 61 | fw.close(); 62 | } catch (IOException ioe) { 63 | System.err.println("IOException: " + ioe.getMessage()); 64 | } 65 | } 66 | 67 | // public static void retrainModel2(String questionCategory, List splitsentences) { 68 | // Scanner scanIn = new Scanner(System.in); 69 | // System.out.println("Correct Ans: "); 70 | // Integer lineNo = Integer.valueOf(scanIn.nextLine()); 71 | // System.out.println(NLPUtil.ansWithSentence.get(lineNo)); 72 | // List oldWords = new ArrayList(TestDeepQA.responseMap.keySet()); 73 | // 74 | // System.out.println("oldWord: "+oldWords.get(lineNo)); 75 | // 76 | // String newWord = " "+oldWords.get(lineNo)+" "; 77 | // System.out.println("newWord: "+newWord); 78 | // String newLine = NLPUtil.ansWithSentence.get(lineNo).replaceAll(oldWords.get(lineNo),newWord); 79 | // System.out.println(newLine); 80 | // String selectedModel = DocumentCategory.valueOf(questionCategory).getCategory(); 81 | // 82 | // boolean status = trainModel(selectedModel, newLine); 83 | // System.out.println("Training status: "+(status?"success":"failed")); 84 | // } 85 | } 86 | -------------------------------------------------------------------------------- /DeepQA/src/deepqa/wordnet/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQA/src/deepqa/wordnet/.DS_Store -------------------------------------------------------------------------------- /DeepQA/src/deepqa/wordnet/WordNetTest.java: -------------------------------------------------------------------------------- 1 | package deepqa.wordnet; 2 | 3 | 4 | import deepqa.constants.Constants; 5 | import edu.smu.tspell.wordnet.Synset; 6 | import edu.smu.tspell.wordnet.SynsetType; 7 | import edu.smu.tspell.wordnet.WordNetDatabase; 8 | 9 | /** 10 | * Displays word forms and definitions for synsets containing the word form 11 | * specified on the command line. To use this application, specify the word 12 | * form that you wish to view synsets for, as in the following example which 13 | * displays all synsets containing the word form "airplane": 14 | *
15 | * java TestJAWS airplane 16 | */ 17 | public class WordNetTest 18 | { 19 | 20 | /** 21 | * Main entry point. The command-line arguments are concatenated together 22 | * (separated by spaces) and used as the word form to look up. 23 | */ 24 | public static void main(String[] arg) 25 | { 26 | String[] args = {"brought"}; 27 | System.setProperty("wordnet.database.dir", Constants.WORDNET_LOC+"\\dict"); 28 | if (args.length > 0) 29 | { 30 | // Concatenate the command-line arguments 31 | StringBuffer buffer = new StringBuffer(); 32 | for (int i = 0; i < args.length; i++) 33 | { 34 | buffer.append((i > 0 ? " " : "") + args[i]); 35 | } 36 | String wordForm = buffer.toString(); 37 | // Get the synsets containing the wrod form 38 | WordNetDatabase database = WordNetDatabase.getFileInstance(); 39 | Synset[] synsets = database.getSynsets(wordForm, SynsetType.VERB); 40 | // Display the word forms and definitions for synsets retrieved 41 | if (synsets.length > 0) 42 | { 43 | System.out.println("The following synsets contain '" + 44 | wordForm + "' or a possible base form " + 45 | "of that text:"); 46 | for (int i = 0; i < synsets.length; i++) 47 | { 48 | System.out.println(""); 49 | String[] wordForms = synsets[i].getWordForms(); 50 | //System.out.print(synsets[i].getType()); //Numeric representing SynsetType 51 | for (int j = 0; j < wordForms.length; j++) 52 | { 53 | System.out.print((j > 0 ? ", " : "") + wordForms[j]); 54 | } 55 | //System.out.println(": " + synsets[i].getDefinition()); 56 | } 57 | } 58 | else 59 | { 60 | System.err.println("No synsets exist that contain " + 61 | "the word form '" + wordForm + "'"); 62 | } 63 | } 64 | else 65 | { 66 | System.err.println("You must specify " + 67 | "a word form for which to retrieve synsets."); 68 | } 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /DeepQA/src/deepqa/wordnet/WordNetUtil.java: -------------------------------------------------------------------------------- 1 | package deepqa.wordnet; 2 | 3 | import java.util.HashSet; 4 | import java.util.Map.Entry; 5 | import java.util.Set; 6 | 7 | import org.apache.log4j.Logger; 8 | 9 | import deepqa.constants.Constants; 10 | import edu.smu.tspell.wordnet.Synset; 11 | import edu.smu.tspell.wordnet.SynsetType; 12 | import edu.smu.tspell.wordnet.WordNetDatabase; 13 | import gov.nist.msi.ssmpi.similarity.impl.SSTop_WN_Jaccard; 14 | 15 | public class WordNetUtil { 16 | 17 | public static final double similarityCriteria = 0.45; //used by Jaccard's similarity index 18 | 19 | final static Logger LOGGER = Logger.getLogger(WordNetUtil.class); 20 | 21 | public static Set getSynonyms(Entry taggedToken) { 22 | 23 | final String tag = taggedToken.getValue(); 24 | final String word = taggedToken.getKey(); 25 | 26 | System.setProperty("wordnet.database.dir", 27 | Constants.WORDNET_DIC_LOC); 28 | Set synonyms = null; 29 | if (word != null) { 30 | 31 | //Loading WordNet Database 32 | WordNetDatabase database = WordNetDatabase.getFileInstance(); 33 | 34 | Synset[] synsets = null; 35 | 36 | // Get the synsets containing the word form 37 | switch (tag) { 38 | case("VB"): 39 | case("VBD"): 40 | case("VBG"): 41 | case("VBN"): 42 | case("VBP"): 43 | case("VBZ"): 44 | LOGGER.debug("Verb identified"); 45 | synsets = database.getSynsets(word, SynsetType.VERB); 46 | break; 47 | case("RB"): 48 | case("RBR"): 49 | case("RBS"): 50 | LOGGER.debug("Adverb identified"); 51 | synsets = database.getSynsets(word, SynsetType.ADVERB); 52 | break; 53 | case("JJ"): 54 | case("JJR"): 55 | case("JJS"): 56 | LOGGER.debug("Adjective identified"); 57 | synsets = database.getSynsets(word, SynsetType.ADJECTIVE); 58 | break; 59 | default: 60 | LOGGER.debug("Avoiding WordNet search for: "+word); 61 | } 62 | // Display the word forms and definitions for synsets retrieved 63 | if (synsets != null && synsets.length > 0) { 64 | synonyms = new HashSet(); 65 | LOGGER.debug("The following synsets contain '" 66 | + word 67 | + "' or a possible base form of that text:"); 68 | for (int i = 0; i < synsets.length; i++) { 69 | String[] wordForms = synsets[i].getWordForms(); 70 | for (int j = 0; j < wordForms.length; j++) { 71 | if (!synonyms.contains(wordForms[j])) { 72 | SSTop_WN_Jaccard sim = new SSTop_WN_Jaccard(); 73 | float r = sim.getSimilarity(word, 74 | wordForms[j]); 75 | if (r > similarityCriteria) 76 | synonyms.add(wordForms[j]); 77 | } 78 | } 79 | } 80 | 81 | } else { 82 | LOGGER.debug("No synsets exist that contain " 83 | + "the word form '" + word + "'"); 84 | } 85 | } else { 86 | LOGGER.debug("You must specify " 87 | + "a word form for which to retrieve synsets."); 88 | } 89 | return synonyms; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /DeepQA/src/log4j.properties: -------------------------------------------------------------------------------- 1 | # Root logger option 2 | log4j.rootLogger=DEBUG, stdout, file 3 | 4 | # Redirect log messages to console 5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 6 | log4j.appender.stdout.Target=System.out 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n 9 | 10 | # Redirect log messages to a log file, support file rolling. 11 | log4j.appender.file=org.apache.log4j.RollingFileAppender 12 | log4j.appender.file.File=C:\\log4j-application.log 13 | log4j.appender.file.MaxFileSize=5MB 14 | log4j.appender.file.MaxBackupIndex=10 15 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 16 | log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n -------------------------------------------------------------------------------- /DeepQARService/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQARService/.DS_Store -------------------------------------------------------------------------------- /DeepQARService/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DeepQARService/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DeepQARService 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.wst.jsdt.core.jsNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /DeepQARService/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DeepQARService/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /DeepQARService/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DeepQARService/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /DeepQARService/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /DeepQARService/WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /DeepQARService/WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | DeepQARService 4 | 5 | index.html 6 | index.htm 7 | index.jsp 8 | default.html 9 | default.htm 10 | default.jsp 11 | 12 | 13 | jersey-servlet 14 | 15 | org.glassfish.jersey.servlet.ServletContainer 16 | 17 | 18 | jersey.config.server.provider.packages 19 | deepqa.rest.service 20 | 21 | 1 22 | 23 | 24 | jersey-servlet 25 | /rest/* 26 | 27 | -------------------------------------------------------------------------------- /DeepQARService/src/deepqa/rest/bean/AnswerBean.java: -------------------------------------------------------------------------------- 1 | package deepqa.rest.bean; 2 | 3 | import javax.xml.bind.annotation.XmlRootElement; 4 | 5 | @XmlRootElement 6 | public class AnswerBean implements Comparable{ 7 | private String answer; 8 | private String confidence; 9 | private String source; 10 | 11 | public String getAnswer() { 12 | return answer; 13 | } 14 | public void setAnswer(String answer) { 15 | this.answer = answer; 16 | } 17 | public String getConfidence() { 18 | return confidence; 19 | } 20 | public void setConfidence(String confidence) { 21 | this.confidence = confidence; 22 | } 23 | public String getSource() { 24 | return source; 25 | } 26 | public void setSource(String source) { 27 | this.source = source; 28 | } 29 | @Override 30 | public String toString() { 31 | return "AnswerBean [answer=" + answer + ", confidence=" + confidence 32 | + ", source=" + source + "]"; 33 | } 34 | @Override 35 | public int compareTo(AnswerBean o) { 36 | return Integer.parseInt(o.confidence)-Integer.parseInt(confidence); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /DeepQARService/src/deepqa/rest/service/QAService.java: -------------------------------------------------------------------------------- 1 | package deepqa.rest.service; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.Collection; 6 | import java.util.Collections; 7 | import java.util.List; 8 | import java.util.Map; 9 | import java.util.Map.Entry; 10 | import java.util.TreeMap; 11 | 12 | import javax.ws.rs.Consumes; 13 | import javax.ws.rs.POST; 14 | import javax.ws.rs.Path; 15 | import javax.ws.rs.Produces; 16 | import javax.ws.rs.core.MediaType; 17 | import javax.ws.rs.core.MultivaluedMap; 18 | 19 | import org.apache.solr.client.solrj.SolrServer; 20 | import org.apache.solr.client.solrj.SolrServerException; 21 | import org.apache.solr.client.solrj.impl.HttpSolrServer; 22 | import org.apache.solr.client.solrj.response.UpdateResponse; 23 | import org.apache.solr.common.SolrInputDocument; 24 | 25 | import com.avnet.deepqa.dto.AnsConfRefBean; 26 | import com.avnet.deepqa.test.TestDeepQA; 27 | import com.google.gson.Gson; 28 | 29 | import deepqa.rest.bean.AnswerBean; 30 | 31 | @Path("/service") 32 | public class QAService { 33 | 34 | @Path("/fetchAns") 35 | @POST 36 | @Produces({ MediaType.TEXT_PLAIN }) 37 | @Consumes({MediaType.TEXT_PLAIN}) 38 | public String fetchAnswers(String question){ 39 | System.out.println("hit"); 40 | System.out.println(question); 41 | cleanQue(question); 42 | AnsConfRefBean ansConfRefBean = TestDeepQA.askMe(question, null); 43 | System.out.println(ansConfRefBean); 44 | 45 | List answerBeanList = new ArrayList(); 46 | convertDTOToRestBean(ansConfRefBean, answerBeanList); 47 | Collections.sort(answerBeanList); 48 | 49 | return new Gson().toJson(answerBeanList); 50 | } 51 | 52 | 53 | 54 | private void cleanQue(String question) { 55 | question = question.replaceAll("co-founder", "cofounder"); 56 | question = question.replace("?", ""); 57 | 58 | } 59 | 60 | 61 | 62 | private void convertDTOToRestBean(AnsConfRefBean ansConfRefBean, 63 | List answerBeanList) { 64 | TreeMap ansWithConf = ansConfRefBean.getAnsWithConf(); 65 | Map ansWithSent = ansConfRefBean.getAnsWithSentence(); 66 | 67 | System.out.println(ansWithConf.keySet()); 68 | System.out.println("jj:"+ansWithConf.get("Steve Jobs")); 69 | 70 | 71 | for(Entry ans: ansWithConf.entrySet()){ 72 | AnswerBean answer = new AnswerBean(); 73 | answer.setAnswer(ans.getKey().replaceAll("\"","").replaceAll("'", "")); 74 | answer.setConfidence(getInPercentage(ans.getValue())); 75 | answer.setSource((ansWithSent.get(ans.getKey())).replaceAll("\"","").replaceAll("'", "").replaceAll("\\P{Print}", "")); 76 | System.out.println(answer); 77 | answerBeanList.add(answer); 78 | } 79 | } 80 | 81 | private String getInPercentage(double value) { 82 | value = value*50; 83 | return Integer.toString((int)value); 84 | 85 | } 86 | 87 | @Path("/test") 88 | @POST 89 | @Produces({MediaType.TEXT_PLAIN}) 90 | @Consumes({MediaType.TEXT_PLAIN}) 91 | public String hello(String s){ 92 | return "hello "+s; 93 | } 94 | 95 | @Path("/solr/index") 96 | @POST 97 | @Consumes(MediaType.APPLICATION_FORM_URLENCODED) 98 | public void indexDocument(MultivaluedMap multivaluedMap){ 99 | 100 | String title = multivaluedMap.get("title").get(0); 101 | String content = multivaluedMap.get("content").get(0); 102 | 103 | SolrServer server = new HttpSolrServer("http://localhost:8983/solr/"); 104 | SolrInputDocument doc1 = new SolrInputDocument(); 105 | doc1.addField( "id", Integer.toString((int)(Math.random()*100)) ); 106 | doc1.addField( "title", title ); 107 | doc1.addField( "content", content ); 108 | Collection docs = new ArrayList(); 109 | docs.add( doc1 ); 110 | try { 111 | server.add(docs); 112 | UpdateResponse solrResponse = server.commit(); 113 | System.out.println(solrResponse.getStatus()); 114 | } catch (SolrServerException | IOException e) { 115 | // TODO Auto-generated catch block 116 | e.printStackTrace(); 117 | } 118 | 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /DeepQASupport/.gitignore: -------------------------------------------------------------------------------- 1 | /cyc/ 2 | /WordNet-3.0/ 3 | /.DS_Store 4 | -------------------------------------------------------------------------------- /DeepQASupport/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DeepQASupport 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.wst.common.project.facet.core.nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/AUTHORS: -------------------------------------------------------------------------------- 1 | Cognitive Science Laboratory 2 | Princeton University 3 | 4 | http://wordnet.princeton.edu 5 | wordnet@princeton.edu 6 | 7 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/COPYING: -------------------------------------------------------------------------------- 1 | WordNet Release 3.0 2 | 3 | This software and database is being provided to you, the LICENSEE, by 4 | Princeton University under the following license. By obtaining, using 5 | and/or copying this software and database, you agree that you have 6 | read, understood, and will comply with these terms and conditions.: 7 | 8 | Permission to use, copy, modify and distribute this software and 9 | database and its documentation for any purpose and without fee or 10 | royalty is hereby granted, provided that you agree to comply with 11 | the following copyright notice and statements, including the disclaimer, 12 | and that the same appear on ALL copies of the software, database and 13 | documentation, including modifications that you make for internal 14 | use or for distribution. 15 | 16 | WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. 17 | 18 | THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON 19 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 20 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON 21 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- 22 | ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE 23 | OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT 24 | INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 25 | OTHER RIGHTS. 26 | 27 | The name of Princeton University or Princeton may not be used in 28 | advertising or publicity pertaining to distribution of the software 29 | and/or database. Title to copyright in this software, database and 30 | any associated documentation shall at all times remain with 31 | Princeton University and LICENSEE agrees to preserve same. 32 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/LICENSE: -------------------------------------------------------------------------------- 1 | WordNet Release 3.0 2 | 3 | This software and database is being provided to you, the LICENSEE, by 4 | Princeton University under the following license. By obtaining, using 5 | and/or copying this software and database, you agree that you have 6 | read, understood, and will comply with these terms and conditions.: 7 | 8 | Permission to use, copy, modify and distribute this software and 9 | database and its documentation for any purpose and without fee or 10 | royalty is hereby granted, provided that you agree to comply with 11 | the following copyright notice and statements, including the disclaimer, 12 | and that the same appear on ALL copies of the software, database and 13 | documentation, including modifications that you make for internal 14 | use or for distribution. 15 | 16 | WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. 17 | 18 | THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON 19 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 20 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON 21 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- 22 | ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE 23 | OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT 24 | INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 25 | OTHER RIGHTS. 26 | 27 | The name of Princeton University or Princeton may not be used in 28 | advertising or publicity pertaining to distribution of the software 29 | and/or database. Title to copyright in this software, database and 30 | any associated documentation shall at all times remain with 31 | Princeton University and LICENSEE agrees to preserve same. 32 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/README: -------------------------------------------------------------------------------- 1 | 2 | This is the README file for WordNet 3.0 3 | 4 | 1. About WordNet 5 | 6 | WordNet was developed at Princeton University's Cognitive Science 7 | Laboratory under the direction of George Miller, James S. McDonnell 8 | Distinguished University Professor of Psychology, Emeritus. Over the 9 | years many linguists, lexicographers, students, and software engineers 10 | have contributed to the project. 11 | 12 | WordNet is an online lexical reference system. Word forms in WordNet 13 | are represented in their familiar orthography; word meanings are 14 | represented by synonym sets (synsets) - lists of synonymous word forms 15 | that are interchangeable in some context. Two kinds of relations are 16 | recognized: lexical and semantic. Lexical relations hold between word 17 | forms; semantic relations hold between word meanings. 18 | 19 | To learn more about WordNet, the book "WordNet: An Electronic Lexical 20 | Database," containing an updated version of "Five Papers on WordNet" 21 | and additional papers by WordNet users, is available from MIT Press: 22 | 23 | http://mitpress.mit.edu/book-home.tcl?isbn=026206197X 24 | 25 | 2. The WordNet Web Site 26 | 27 | We maintain a Web site at: 28 | 29 | http://wordnet.princeton.edu 30 | 31 | Information about WordNet, access to our online interface, and the 32 | various WordNet packages that you can download are available from our 33 | web site. All of the software documentation is available online, as 34 | well as a FAQ. On this site we also have information about other 35 | applications that use WordNet. If you have an application that you 36 | would like included, please send e-mail to the above address. 37 | 38 | 3. Contacting Us 39 | 40 | Ongoing deveopment work and WordNet related projects are done by a 41 | small group of researchers, lexicographers, and systems programmers. 42 | Since our resources are VERY limited, we request that you please 43 | confine correspondence to WordNet topics only. Please check the 44 | documentation, FAQ, and other resources for the answer to your 45 | question or problem before contacting us. 46 | 47 | If you have trouble installing or downloading WordNet, have a bug to 48 | report, or any other problem, please refer to the online FAQ file 49 | first. If you can heal thyself, please do so. The FAQ will be 50 | updated over time. And if you do find a previously unreported 51 | problem, please use our Bug Report Form: 52 | 53 | http://wordnet.princeton.edu/cgi-bin/bugsubmit.pl 54 | 55 | When reporting a problem, please be as specific as possible, stating 56 | the computer platform you are using, which interface you are using, 57 | and the exact error. The more details you can provide, the more 58 | likely it is that you will get an answer. 59 | 60 | There is a WordNet user discussion group mailing list that we invite 61 | our users to join. Users use this list to ask questions of one 62 | another, announce extensions to WordNet that they've developed, and 63 | other topics of general usefulness to the user community. 64 | 65 | Information on joining the user discussion list, reporting bugs and other 66 | contact information is in found on our website at: 67 | 68 | http://wordnet.princeton.edu/contact 69 | 70 | 4. Current Release 71 | 72 | WordNet Version 3.0 is the latest version available for download. Two 73 | basic database packages are available - one for Windows and one for 74 | Unix platforms (including Mac OS X). See the file ChangeLog (Unix) or 75 | CHANGES.txt (Windows) for a list of changes from previous versions. 76 | 77 | WordNet packages can either be downloaded from our web site via: 78 | 79 | http://wordnet.princeton.edu/obtain 80 | 81 | The Windows package is a self-extracting archive that installs itself 82 | when you double-click on it. 83 | 84 | Beginning with Version 2.1, we changed the Unix package to a GNU Autotools 85 | package. The WordNet browser makes use of the open source Tcl and Tk 86 | packages. Many systems come with either or both pre-installed. If 87 | your system doesn't (some systems have Tcl installed, but not Tk) 88 | Tcl/Tk can be downloaded from: 89 | 90 | http://www.tcl.tk/ 91 | 92 | Tcl and Tk must be installed BEFORE you compile WordNet. You must also 93 | have a C compiler before installing Tcl/Tk or WordNet. WordNet has 94 | been built and tested with the GNU gcc compiler. This is 95 | pre-installed on most Unix systems, and can be downloaded from: 96 | 97 | http://gcc.gnu.org/ 98 | 99 | See the file INSTALL for detailed WordNet installation instructions. 100 | 101 | 102 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/dict/adv.exc: -------------------------------------------------------------------------------- 1 | best well 2 | better well 3 | deeper deeply 4 | farther far 5 | further far 6 | harder hard 7 | hardest hard 8 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/dict/frames.vrb: -------------------------------------------------------------------------------- 1 | 1 Something ----s 2 | 2 Somebody ----s 3 | 3 It is ----ing 4 | 4 Something is ----ing PP 5 | 5 Something ----s something Adjective/Noun 6 | 6 Something ----s Adjective/Noun 7 | 7 Somebody ----s Adjective 8 | 8 Somebody ----s something 9 | 9 Somebody ----s somebody 10 | 10 Something ----s somebody 11 | 11 Something ----s something 12 | 12 Something ----s to somebody 13 | 13 Somebody ----s on something 14 | 14 Somebody ----s somebody something 15 | 15 Somebody ----s something to somebody 16 | 16 Somebody ----s something from somebody 17 | 17 Somebody ----s somebody with something 18 | 18 Somebody ----s somebody of something 19 | 19 Somebody ----s something on somebody 20 | 20 Somebody ----s somebody PP 21 | 21 Somebody ----s something PP 22 | 22 Somebody ----s PP 23 | 23 Somebody's (body part) ----s 24 | 24 Somebody ----s somebody to INFINITIVE 25 | 25 Somebody ----s somebody INFINITIVE 26 | 26 Somebody ----s that CLAUSE 27 | 27 Somebody ----s to somebody 28 | 28 Somebody ----s to INFINITIVE 29 | 29 Somebody ----s whether INFINITIVE 30 | 30 Somebody ----s somebody into V-ing something 31 | 31 Somebody ----s something with something 32 | 32 Somebody ----s INFINITIVE 33 | 33 Somebody ----s VERB-ing 34 | 34 It ----s that CLAUSE 35 | 35 Something ----s INFINITIVE 36 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/dict/lexnames: -------------------------------------------------------------------------------- 1 | 00 adj.all 3 2 | 01 adj.pert 3 3 | 02 adv.all 4 4 | 03 noun.Tops 1 5 | 04 noun.act 1 6 | 05 noun.animal 1 7 | 06 noun.artifact 1 8 | 07 noun.attribute 1 9 | 08 noun.body 1 10 | 09 noun.cognition 1 11 | 10 noun.communication 1 12 | 11 noun.event 1 13 | 12 noun.feeling 1 14 | 13 noun.food 1 15 | 14 noun.group 1 16 | 15 noun.location 1 17 | 16 noun.motive 1 18 | 17 noun.object 1 19 | 18 noun.person 1 20 | 19 noun.phenomenon 1 21 | 20 noun.plant 1 22 | 21 noun.possession 1 23 | 22 noun.process 1 24 | 23 noun.quantity 1 25 | 24 noun.relation 1 26 | 25 noun.shape 1 27 | 26 noun.state 1 28 | 27 noun.substance 1 29 | 28 noun.time 1 30 | 29 verb.body 2 31 | 30 verb.change 2 32 | 31 verb.cognition 2 33 | 32 verb.communication 2 34 | 33 verb.competition 2 35 | 34 verb.consumption 2 36 | 35 verb.contact 2 37 | 36 verb.creation 2 38 | 37 verb.emotion 2 39 | 38 verb.motion 2 40 | 39 verb.perception 2 41 | 40 verb.possession 2 42 | 41 verb.social 2 43 | 42 verb.stative 2 44 | 43 verb.weather 2 45 | 44 adj.ppl 3 46 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/dict/log.grind.3.0: -------------------------------------------------------------------------------- 1 | Processing adj.all... 2 | Processing adj.pert... 3 | Processing adv.all... 4 | Processing noun.Tops... 5 | noun.Tops, line 7: warning: No hypernyms in synset 6 | Processing noun.act... 7 | Processing noun.animal... 8 | Processing noun.artifact... 9 | Processing noun.attribute... 10 | Processing noun.body... 11 | Processing noun.cognition... 12 | Processing noun.communication... 13 | Processing noun.event... 14 | Processing noun.feeling... 15 | Processing noun.food... 16 | Processing noun.group... 17 | Processing noun.location... 18 | Processing noun.motive... 19 | Processing noun.object... 20 | Processing noun.person... 21 | Processing noun.phenomenon... 22 | Processing noun.plant... 23 | Processing noun.possession... 24 | Processing noun.process... 25 | Processing noun.quantity... 26 | Processing noun.relation... 27 | Processing noun.shape... 28 | Processing noun.state... 29 | Processing noun.substance... 30 | Processing noun.time... 31 | Processing verb.body... 32 | Processing verb.change... 33 | Processing verb.cognition... 34 | Processing verb.communication... 35 | Processing verb.competition... 36 | Processing verb.consumption... 37 | Processing verb.contact... 38 | Processing verb.creation... 39 | Processing verb.emotion... 40 | Processing verb.motion... 41 | Processing verb.perception... 42 | Processing verb.possession... 43 | Processing verb.social... 44 | Processing verb.stative... 45 | Processing verb.weather... 46 | Processing adj.ppl... 47 | 48 | *** Statistics for ground files: 49 | 50 | 82115 noun synsets 51 | 13767 verb synsets 52 | 3812 adj synsets 53 | 3621 adv synsets 54 | 3651 pertainym synsets 55 | 10693 adjective satellite synsets 56 | 117659 synsets in total (including satellite and pertainym synsets) 57 | 82115 noun synsets have definitional glosses 58 | 13767 verb synsets have definitional glosses 59 | 3812 adj synsets have definitional glosses 60 | 3621 adv synsets have definitional glosses 61 | 3651 pertainym synsets have definitional glosses 62 | 10693 adjective satellite synsets have definitional glosses 63 | 117659 definitional glosses in total (including adjective satellite synsets) 64 | 225000 pointers in total 65 | 206978 synonyms in synsets 66 | 147306 unique word phrases 67 | 83118 word phrases of length 1 68 | 54533 word phrases of length 2 69 | 7766 word phrases of length 3 70 | 1454 word phrases of length 4 71 | 298 word phrases of length 5 72 | 80 word phrases of length 6 73 | 28 word phrases of length 7 74 | 20 word phrases of length 8 75 | 9 word phrases of length 9 76 | 77 | Resolving pointers... 78 | Done resolving pointers... 79 | Getting sense counts... 80 | Done with sense counts... 81 | Figuring out byte offsets... 82 | Dumping data files... 83 | Done dumping data files... 84 | Cannot open file: cntlist 85 | Cannot order senses 86 | Dumping index files... 87 | Done dumping index files... 88 | Dumping sense index... 89 | Done dumping sense index... 90 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/dict/verb.Framestext: -------------------------------------------------------------------------------- 1 | 1 Something ----s 2 | 2 Somebody ----s 3 | 3 It is ----ing 4 | 4 Something is ----ing PP 5 | 5 Something ----s something Adjective/Noun 6 | 6 Something ----s Adjective/Noun 7 | 7 Somebody ----s Adjective 8 | 8 Somebody ----s something 9 | 9 Somebody ----s somebody 10 | 10 Something ----s somebody 11 | 11 Something ----s something 12 | 12 Something ----s to somebody 13 | 13 Somebody ----s on something 14 | 14 Somebody ----s somebody something 15 | 15 Somebody ----s something to somebody 16 | 16 Somebody ----s something from somebody 17 | 17 Somebody ----s somebody with something 18 | 18 Somebody ----s somebody of something 19 | 19 Somebody ----s something on somebody 20 | 20 Somebody ----s somebody PP 21 | 21 Somebody ----s something PP 22 | 22 Somebody ----s PP 23 | 23 Somebody's (body part) ----s 24 | 24 Somebody ----s somebody to INFINITIVE 25 | 25 Somebody ----s somebody INFINITIVE 26 | 26 Somebody ----s that CLAUSE 27 | 27 Somebody ----s to somebody 28 | 28 Somebody ----s to INFINITIVE 29 | 29 Somebody ----s whether INFINITIVE 30 | 30 Somebody ----s somebody into V-ing something 31 | 31 Somebody ----s something with something 32 | 32 Somebody ----s INFINITIVE 33 | 33 Somebody ----s VERB-ing 34 | 34 It ----s that CLAUSE 35 | 35 Something ----s INFINITIVE 36 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/binsrch.3WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BINSRCH(3WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | bin_search, copyfile, replace_line, insert_line 13 |

SYNOPSIS

14 |

15 | char *bin_search(char 16 | *key, FILE *fp);

17 | void copyfile(FILE *fromfp, FILE *tofp);

18 | char *replace_line(char 19 | *new_line, char *key, FILE *fp);

20 | char *insert_line(char *new_line, char 21 | *key, FILE *fp); 22 |

DESCRIPTION

23 |

24 | The WordNet library contains several general 25 | purpose functions for performing a binary search and modifying sorted 26 | files.

27 | bin_search() is the primary binary search algorithm to search for 28 | key as the first item on a line in the file pointed to by fp . The delimiter 29 | between the key and the rest of the fields on the line, if any, must be 30 | a space. A pointer to a static variable containing the entire line is 31 | returned. NULL 32 | is returned if a match is not found.

33 | The remaining functions 34 | are not used by WordNet, and are only briefly described.

35 | copyfile() copies 36 | the contents of one file to another.

37 | replace_line() replaces a line in 38 | a file having searchkey key with the contents of new_line . It returns 39 | the original line or NULL 40 | in case of error.

41 | insert_line() finds the proper 42 | place to insert the contents of new_line , having searchkey key in the 43 | sorted file pointed to by fp . It returns NULL 44 | if a line with this searchkey 45 | is already in the file. 46 |

NOTES

47 | The maximum length of key is 1024.

48 | The 49 | maximum line length in a file is 25K.

50 | If there are no additional fields 51 | after the search key, the key must be followed by at least one space before 52 | the newline character. 53 |

SEE ALSO

54 | wnintro(3WN) 55 | , morph(3WN) 56 | , wnsearch(3WN) 57 | , 58 | wnutil(3WN) 59 | , wnintro(5WN) 60 | . 61 |

WARNINGS

62 | binsearch() returns a pointer to 63 | a static character buffer. The returned string should be copied by the 64 | caller if the results need to be saved, as a subsequent call will replace 65 | the contents of the static buffer.

66 |

67 | 68 |


69 | Table of Contents

70 |

78 | 79 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/uniqbeg.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | UNIQBEG(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | uniqbeg - unique beginners for noun hierarchies 13 |

DESCRIPTION

14 | All 15 | of the WordNet noun synsets are organized into hierarchies, headed by 16 | the unique beginner synset for entity in the file noun.Tops .

17 |

{ entity 18 | (that which is perceived or known or inferred to have its own
19 | distinct 20 | existence (living or nonliving)) }
21 |

22 |

23 | 24 |

NOTES

25 | The lexicographer files are 26 | not included in the WordNet database package. 27 |

FILES

28 | 29 |
30 | 31 |
noun.Tops
32 |
unique beginners 33 | for nouns
34 |
35 | 36 |

SEE ALSO

37 | wndb(5WN) 38 | , wninput(5WN) 39 | , wnintro(7WN) 40 | , wngloss(7WN) 41 | . 42 |

43 | 44 |


45 | Table of Contents

46 |

53 | 54 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wngroups.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNGROUPS(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wngroups - discussion of WordNet search code to group similar verb 13 | senses 14 |

DESCRIPTION

15 | Some similar senses of verbs have been grouped by 16 | the lexicographers. This grouping is done statically in the lexicographer 17 | source files using the semantic pointer_symbol $ . Transitivity is used 18 | to combine groups of overlapping senses into the largest sense groups 19 | possible. 20 |

NOTES

21 | Coverage of verb groups is incomplete. 22 |

ENVIRONMENT VARIABLES 23 | (UNIX)

24 | 25 |
26 | 27 |
WNHOME
28 |
Base directory for WordNet. Default is /usr/local/WordNet-3.0 29 | .
30 | 31 |
WNSEARCHDIR
32 |
Directory in which the WordNet database has been installed. 33 | Default is WNHOME/dict .
34 |
35 | 36 |

REGISTRY (WINDOWS)

37 | 38 |
39 | 40 |
HKEY_LOCAL_MACHINE\SOFTWARE\WordNet\3.0\WNHome 41 |
42 |
Base directory for WordNet. Default is C:\Program Files\WordNet\3.0 .
43 |
44 | 45 |

FILES 46 |

47 | 48 |
49 | 50 |
sentidx.vrb
51 |
verb sense keys and sentence frame numbers
52 | 53 |
sents.vrb
54 |
example 55 | sentence frames
56 |
57 | 58 |

SEE ALSO

59 | wn(1WN) 60 | , wnb(1WN) 61 | , senseidx(5WN) 62 | , wnsearch(3WN) 63 | , 64 | wndb(5WN) 65 | , wnintro(7WN) 66 | .

67 |

68 | 69 |


70 | Table of Contents

71 |

80 | 81 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnintro.1WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNINTRO(1WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnintro - WordNet user commands 13 |

SYNOPSIS

14 |

15 | wn - command line interface 16 | to WordNet database

17 | wnb - window based WordNet browser 18 |

DESCRIPTION

19 | This 20 | section of the WordNet Reference Manual contains manual pages that describe 21 | commands available with the various WordNet system packages.

22 | The WordNet 23 | interfaces wn(1WN) 24 | and wnb(1WN) 25 | allow the user to search the WordNet 26 | database and display the information textually. 27 |

ENVIRONMENT VARIABLES 28 | (UNIX)

29 | 30 |
31 | 32 |
WNHOME
33 |
Base directory for WordNet. Default is /usr/local/WordNet-3.0 34 | .
35 | 36 |
WNSEARCHDIR
37 |
Directory in which the WordNet database has been installed. 38 | Default is WNHOME/dict .
39 |
40 | 41 |

REGISTRY (WINDOWS)

42 | 43 |
44 | 45 |
HKEY_LOCAL_MACHINE\SOFTWARE\WordNet\3.0\WNHome 46 |
47 |
Base directory for WordNet. Default is C:\Program Files\WordNet\3.0 .
48 |
49 | 50 |

SEE 51 | ALSO

52 | grind(1WN) 53 | , wn(1WN) 54 | , wnb(1WN) 55 | , wnintro(3WN) 56 | , wnintro(5WN) 57 | , wnintro(7WN) 58 | . 59 |

60 | Fellbaum, C. (1998), ed. "WordNet: An Electronic Lexical Database" . MIT 61 | Press, Cambridge, MA. 62 |

AVAILABILITY

63 | WordNet has a World Wide Web site at 64 | http://wordnet.princeton.edu 65 | . From this web site users can learn about 66 | the WordNet project, run several different interfaces to the WordNet database, 67 | and download various WordNet system packages and "Five Papers on WordNet" 68 | .

69 | 70 |


71 | Table of Contents

72 |

81 | 82 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnintro.5WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNINTRO(5WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnintro - introduction to descriptions of WordNet file formats 13 | 14 |

SYNOPSIS

15 |

16 | cntlist - format of cntlist and cntlist.rev files

17 | lexnames 18 | - list of lexicographer file names and numbers

19 | prologdb - description of 20 | Prolog database files

21 | senseidx - format of sense index file

22 | sensemap 23 | - mapping from senses in WordNet 2.1 to corresponding 3.0 senses

24 | wndb - format 25 | of WordNet database files

26 | wninput - format of WordNet lexicographer files 27 | 28 |

DESCRIPTION

29 | This section of the WordNet Reference Manual contains manual 30 | pages that describe the formats of the various files included in different 31 | WordNet 3.0 packages. 32 |

NOMENCLATURE

33 | All files are in ASCII. Fields are generally 34 | separated by one space, unless otherwise noted, and each line is terminated 35 | with a newline character. In the file format descriptions, terms in italics 36 | refer to field names. Characters or strings in boldface represent an 37 | actual character or string as it appears in the file. Items enclosed in 38 | italicized square brackets ([  ] ) may not be present. Since several files 39 | contain fields that have the identical meaning, field names are consistently 40 | defined. For example, several WordNet files contain one or more synset_offset 41 | fields. In each case, the definition of synset_offset is identical. 42 | 43 |

SEE ALSO

44 | wnintro(1WN) 45 | , wnintro(3WN) 46 | , cntlist(5WN) 47 | , lexnames(5WN) 48 | , prologdb(5WN) 49 | , 50 | senseidx(5WN) 51 | , sensemap(5WN) 52 | , wndb(5WN) 53 | , wninput(5WN) 54 | , wnintro(7WN) 55 | , wngloss(7WN) 56 | . 57 |

58 | Fellbaum, C. (1998), ed. "WordNet: An Electronic Lexical Database" . MIT 59 | Press, Cambridge, MA.

60 |

61 | 62 |


63 | Table of Contents

64 |

71 | 72 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnintro.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNINTRO(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnintro - introduction to miscellaneous WordNet information 13 |

SYNOPSIS 14 |

15 |

16 | morphy - discussion of WordNet's morphological processing

17 | uniqbeg - unique 18 | beginners for noun hierarchies

19 | wngloss - glossary of terms used in WordNet 20 |

21 | wngroups - discussion of WordNet search code to group similar senses

22 | wnlicens 23 | - text of WordNet license agreement

24 | wnpkgs - information about WordNet 25 | packages and distribution

26 | wnstats - database statistics 27 |

DESCRIPTION

28 | This 29 | section of the WordNet Reference Manual contains manual pages that describe 30 | various topics related to WordNet and the semantic concordances, and a 31 | glossary of terms. 32 |

SEE ALSO

33 | wnintro(1WN) 34 | , wnintro(3WN) 35 | , wnintro(5WN) 36 | , 37 | morphy(7WN) 38 | , uniqbeg(7WN) 39 | , wngroups(7WN) 40 | , wnlicens(7WN) 41 | , wnpkgs(7WN) 42 | , 43 | wnstats(7WN) 44 | , wngloss(7WN) 45 | .

46 | Fellbaum, C. (1998), ed. "WordNet: An Electronic 47 | Lexical Database" . MIT Press, Cambridge, MA.

48 | 49 |


50 | Table of Contents

51 |

57 | 58 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnlicens.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNLICENS(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnlicens - text of WordNet license 13 |

DESCRIPTION

14 | WordNet Release 3.0 15 |

16 | This software and database is being provided to you, the LICENSEE, by 17 | Princeton University under the following license. By obtaining, using 18 | and/or copying this software and database, you agree that you have 19 | read, understood, and will comply with these terms and conditions.: 20 | Permission to use, copy, modify and distribute this software and 21 | database and its documentation for any purpose and without fee or royalty 22 | is hereby granted, provided that you agree to comply with the following 23 | copyright notice and statements, including the disclaimer, and that 24 | the same appear on ALL copies of the software, database and documentation, 25 | including modifications that you make for internal use or for distribution. 26 | WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. 27 | THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON UNIVERSITY 28 | MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF 29 | EXAMPLE, BUT NOT LIMITATION, PRINCETON UNIVERSITY MAKES NO REPRESENTATIONS 30 | OR WARRANTIES OF MERCHANT- ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE 31 | OR THAT THE USE OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION 32 | WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 33 | OTHER RIGHTS. The name of Princeton University or Princeton may 34 | not be used in advertising or publicity pertaining to distribution of 35 | the software and/or database. Title to copyright in this software, database 36 | and any associated documentation shall at all times remain with Princeton 37 | University and LICENSEE agrees to preserve same.

38 | 39 |


40 | Table of Contents

41 |

45 | 46 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnpkgs.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNPKGS(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnpkgs - description of various WordNet system packages 13 |

DESCRIPTION 14 |

15 | WordNet 3.0 is distributed in several formats and in various packages. All 16 | of the packages are available via anonymous FTP from ftp.cogsci.princeton.edu 17 | and from the WordNet Web site at http://wordnet.princeton.edu 18 | . 19 |

Packages 20 | Available Via FTP and WWW

21 | The following WordNet packages can be downloaded 22 | using a web browser from ftp://ftp.cogsci.princeton.edu/wordnet/3.0 , or from 23 | the Web site noted above. Users can also FTP directly from ftp.cogsci.princeton.edu 24 | , directory wordnet/3.0 .

25 | 26 | 28 | 30 | 33 | 34 | 36 | 38 |
Package Filename Platform Description 27 |
Database WordNet-3.0.tar.gz Unix/OS X WordNet 3.0 database, interfaces, 29 | sense index, interface and library source code, documentation.
Database 31 | WordNet-3.0.exe Windows WordNet 3.0 database, interfaces, sense index, 32 | interface and library source code, documentation.
Prolog Database WNprolog-3.0.tar.gz All WordNet 3.0 database files in Prolog-readable format, 35 | documentation.
Sense Map WNsnsmap-3.0.tar.gz All Mapping of 2.1 to 3.0 37 | senses, documentation.
39 |

40 | 41 |

Database Package

42 | The database package is a 43 | complete installation for WordNet 3.0 users. It includes the 3.0 database 44 | files, source code for the WordNet browsers and library, and documentation. 45 | The other packages are not included - they must be downloaded and installed 46 | separately.

47 | Note that with this version of WordNet for Unix platforms, 48 | only source code is provided. Users should carefully read the README and 49 | INSTALL files for detailed information on compiling WordNet and dependencies. 50 |

51 | 52 |

Prolog Database Package

53 | The WordNet 3.0 database files are available 54 | in this package in a Prolog-readable format. Documentation describing the 55 | file format is included. This package is only downloadable in compressed 56 | tar file format, although once unpackaged it can be used from Windows 57 | systems since the files are in ASCII. Many Windows utilities, such as 58 | WinZip, can deal with a compressed tar file. 59 |

Sense Map Package

60 | To help 61 | users automatically convert 2.1 noun and verb senses to their corresponding 62 | 3.0 senses, we provide sense mapping information in this package. This 63 | package contains files to map polysemous and monosemous words, and documentation 64 | that describes the format of these files. As with the Prolog database, 65 | this package is only downloadable in compressed tar format, but the files 66 | are also in ASCII. 67 |

NOTES

68 | The lexicographer files and grind(1WN) 69 | program 70 | are not generally distributed.

71 | All of the packages described above may 72 | not be available at the time of release of the 3.0 database package. 73 |

SEE 74 | ALSO

75 | wnintro(1WN) 76 | , wnintro(3WN) 77 | , wnintro(5WN) 78 | , wnintro(7WN) 79 | .

80 | 81 |


82 | Table of Contents

83 |

95 | 96 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/html/wnstats.7WN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WNSTATS(7WN) manual page 7 | 8 | 9 | Table of Contents

10 | 11 |

NAME

12 | wnstats - WordNet 3.0 database statistics 13 |

DESCRIPTION

14 | 15 |

Number of 16 | words, synsets, and senses

17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
POS Unique Synsets Total
Strings 20 | Word-Sense Pairs
Noun 117798 82115 146312
Verb 11529 13767 25047
Adjective 21479 18156 30002
Adverb 4481 3621 5580
Totals 155287 117659 206941
29 |

30 | 31 |

Polysemy information

32 |

33 | 34 | 35 | 36 | 38 | 39 | 40 | 41 | 42 | 43 | 45 |
POS Monosemous Polysemous Polysemous
Words and Senses Words 37 | Senses
Noun 101863 15935 44449
Verb 6277 5252 18770
Adjective 16503 4976 14399
Adverb 3748 733 1832
Totals 44 | 128391 26896 79450
46 |

47 | 48 | 50 | 51 | 53 | 54 | 55 | 57 |
POS Average Polysemy Average Polysemy 49 |
Including Monosemous Words Excluding Monosemous Words
Noun 52 | 1.24 2.79
Verb 2.17 3.57
Adjective 1.40 2.71
Adverb 1.25 2.50 56 |
58 |

59 | 60 |

NOTES

61 | Statistics for all types of adjectives and adjective satellites 62 | are combined.

63 | The total of all unique noun, verb, adjective, and adverb 64 | strings is actually 147278. However, many strings are unique within a syntactic 65 | category, but are in more than one syntactic category. The figures in 66 | the table represent the unique strings in each syntactic category.

67 |

68 | 69 |


70 | Table of Contents

71 |

80 | 81 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/binsrch.3: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .TH BINSRCH 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" 4 | .SH NAME 5 | bin_search, copyfile, replace_line, insert_line 6 | .SH SYNOPSIS 7 | .LP 8 | \fBchar *bin_search(char *key, FILE *fp);\fP 9 | .LP 10 | \fBvoid copyfile(FILE *fromfp, FILE *tofp);\fP 11 | .LP 12 | \fBchar *replace_line(char *new_line, char *key, FILE *fp);\fP 13 | .LP 14 | \fBchar *insert_line(char *new_line, char *key, FILE *fp);\fP 15 | .SH DESCRIPTION 16 | .LP 17 | The WordNet library contains several general purpose functions for 18 | performing a binary search and modifying sorted files. 19 | .LP 20 | .B bin_search(\|) 21 | is the primary binary search algorithm to search for \fIkey\fP as the 22 | first item on a line in the file pointed to by \fIfp\fP. The 23 | delimiter between the key and the rest of the fields on the line, if 24 | any, must be a space. A pointer to a static variable containing the 25 | entire line is returned. 26 | .SB NULL 27 | is returned if a match is not found. 28 | .LP 29 | The remaining functions are not used by WordNet, and are only briefly 30 | described. 31 | .LP 32 | .B copyfile(\|) 33 | copies the contents of one file to another. 34 | .LP 35 | .B replace_line(\|) 36 | replaces a line in a file having searchkey \fIkey\fP 37 | with the contents of \fInew_line\fP. 38 | It returns the original line or 39 | .SB NULL 40 | in case of error. 41 | .LP 42 | .B insert_line(\|) 43 | finds the proper place to insert the contents of \fInew_line\fP, 44 | having searchkey \fIkey\fP in the sorted file pointed to by \fIfp\fP. 45 | It returns 46 | .SB NULL 47 | if a line with this searchkey is already in the file. 48 | .SH NOTES 49 | The maximum length of \fIkey\fP is 1024. 50 | 51 | The maximum line length in a file is 25K. 52 | 53 | If there are no additional fields after the search key, the key must 54 | be followed by at least one space before the newline character. 55 | .SH SEE ALSO 56 | .BR wnintro (3WN), 57 | .BR morph (3WN), 58 | .BR wnsearch (3WN), 59 | .BR wnutil (3WN), 60 | .BR wnintro (5WN). 61 | .SH WARNINGS 62 | \fBbinsearch(\|)\fP returns a pointer to a static character buffer. 63 | The returned string should be copied by the caller if the results need 64 | to be saved, as a subsequent call will replace the contents of the 65 | static buffer. 66 | 67 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/cntlist.5: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH CNTLIST 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" 5 | .SH NAME 6 | cntlist \- file listing number of times each tagged sense occurs in a 7 | semantic concordance, sorted most to least frequently tagged 8 | 9 | cntlist.rev \- file listing number of times each tagged sense occurs 10 | in a semantic concordance, sorted by sense key 11 | .SH DESCRIPTION 12 | A cntlist file for a semantic concordance lists the number of times 13 | each semantically tagged sense occurs in the concordance and its 14 | sense number in the WordNet database. Each line in the file 15 | corresponds to a sense in the WordNet database to which at least one 16 | semantic tag points. Only senses that are tagged in a concordance are 17 | in the concordance's cntlist file. 18 | 19 | .SS WordNet Database \fIcntlist\fP File 20 | In the WordNet database, words are assigned sense numbers based on 21 | frequency of use in semantically tagged corpora. The cntlist file used 22 | by 23 | .BR grind (1WN) 24 | to build the WordNet database and assign the sense numbers is a union 25 | of the cntlist files from the various semantic concordances that were 26 | formerly released by Princeton University. This 27 | combined cntlist file is provided with the WordNet package and is 28 | found in the \fBWNSEARCHDIR\fP directory. 29 | 30 | The \fIcntlist.rev\fP file is used at run-time by the WordNet 31 | library code and browser interfaces to print in the output display the 32 | number of times each sense has been tagged. 33 | .SS File Format 34 | Each line in a cntlist file contains information for one sense. The 35 | file is ordered from most to least frequently tagged sense. The 36 | fields are separated by one space, and each line is terminated with a 37 | newline character. Senses having the same \fItag_cnt\fP value are 38 | listed in reverse alphabetical order of the \fIlemma\fP field of the 39 | \fIsense_key\fP. 40 | 41 | Each line in \fBcntlist\fP is of the form: 42 | 43 | .RS 44 | \fItag_cnt~~sense_key~~sense_number\fP 45 | .RE 46 | 47 | where \fItag_cnt\fP is the decimal number of times the sense is tagged 48 | in the corresponding semantic concordance. \fIsense_key\fP is a 49 | WordNet sense encoding and \fIsense_number\fP is a WordNet sense 50 | number as described in 51 | 52 | The \fIcntlist.rev\fP file contains the same fields described above, 53 | in the following order: 54 | 55 | .RS 56 | \fIsense_key~~sense_number~~tag_cnt\fP 57 | .RE 58 | 59 | .SH NOTES 60 | Princeton no longer maintains or releases the Semantic Concordance 61 | files. The \fIcntlist\fP file used to order the senses in WordNet 62 | 3.0 was generated from the Semantic Concordance files at the point 63 | that they were last updated in 2001. In general, the order of senses 64 | presented usually reflects what the user would expect, however sense 65 | ordering is now less reliable than in prior releases and should not be 66 | construed as an accurate indicator of frequency of use. 67 | .SH ENVIRONMENT VARIABLES (UNIX) 68 | .TP 20 69 | .B WNHOME 70 | Base directory for WordNet. Default is 71 | \fB/usr/local/WordNet-3.0\fP. 72 | .TP 20 73 | .B WNSEARCHDIR 74 | Directory in which the WordNet database has been installed. 75 | Default is \fBWNHOME/dict\fP. 76 | .SH REGISTRY (WINDOWS) 77 | .TP 20 78 | .B HKEY_LOCAL_MACHINE\eSOFTWARE\eWordNet\e3.0\eWNHome 79 | Base directory for WordNet. Default is 80 | \fBC:\eProgram~Files\eWordNet\e3.0\fP. 81 | .TP 20 82 | .B HKEY_CURRENT_USER\eSOFTWARE\eWordNet\e3.0\ewnres 83 | User's default browser options. 84 | .SH FILES 85 | .TP 20 86 | .B cntlist, cntlist.rev 87 | file of combined semantic concordance \fBcntlist\fP files. Used to 88 | assign sense numbers in WordNet database 89 | .SH SEE ALSO 90 | .BR grind (1WN), 91 | .BR wnintro (5WN), 92 | .BR senseidx (5WN). 93 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/morph.3: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .TH MORPH 3WN "Dec 2006" "WordNet 3.0" "WordNet\(tm Library Functions" 4 | .SH NAME 5 | morphinit, re_morphinit, morphstr, morphword 6 | .SH SYNOPSIS 7 | .LP 8 | \fB#include "wn.h"\fP 9 | .LP 10 | \fBint morphinit(void);\fP 11 | .LP 12 | \fBint re_morphinit(void);\fP 13 | .LP 14 | \fBchar *morphstr(char *origstr, int pos);\fP 15 | .LP 16 | \fBchar *morphword(char *word, int pos);\fP 17 | .SH DESCRIPTION 18 | .LP 19 | The WordNet morphological processor, Morphy, is accessed through these 20 | functions: 21 | .LP 22 | .B morphinit(\|) 23 | is used to open the exception list files. It returns \fB0\fP if 24 | successful, \fB-1\fP otherwise. The exception list files must be 25 | opened before 26 | .B morphstr(\|) 27 | or 28 | .B morphword(\) 29 | are called. 30 | .LP 31 | .B re_morphinit(\|) 32 | is used to close the exception list files and reopen them, and is used 33 | exclusively for WordNet development. Return codes are as described 34 | above. 35 | .LP 36 | .B morphstr(\|) 37 | is the basic user interface to Morphy. It tries to find the base form 38 | (lemma) of the word or collocation \fIorigstr\fP in the specified 39 | \fIpos\fP. The first call (with \fIorigstr\fP specified) returns a 40 | pointer to the first base form found. Subsequent calls requesting 41 | base forms of the same string must be made with the first argument of 42 | .SB NULL. 43 | When no more base forms for \fIorigstr\fP can be found, 44 | .SB NULL 45 | is returned. Note that \fBmorphstr()\fP returns a pointer to a static 46 | character buffer. A subsequent call to \fBmorphstr()\fP with a new 47 | string (instead of \fBNULL\fP) will overwrite the string pointed to by 48 | a previous call. Users should copy the returned string into a local 49 | buffer, or use the C library function \fBstrdup\fP to duplicate the 50 | returned string into a \fImalloc'd\fP buffer. 51 | .LP 52 | .B morphword(\|) 53 | tries to find the base form of \fIword\fP in the specified \fIpos\fP. 54 | This function is called by 55 | .B morphstr(\|) 56 | for each individual word in a collocation. 57 | Note that \fBmorphword()\fP returns a pointer to a static 58 | character buffer. A subsequent call to \fBmorphword()\fP 59 | will overwrite the string pointed to by 60 | a previous call. Users should copy the returned string into a local 61 | buffer, or use the C library function \fBstrdup\fP to duplicate the 62 | returned string into a \fImalloc'd\fP buffer. 63 | .SH NOTES 64 | .B morphinit(\|) 65 | is called by 66 | .B wninit(\|) 67 | and is not intended to be called directly by an application. 68 | Applications wishing to use WordNet and/or the morphological functions 69 | must call \fBwninit(\|)\fP at the start of the program. See 70 | .BR wnutil (3WN) 71 | for more information. 72 | 73 | \fIorigstr\fP may be either a word or a collocation formed by joining 74 | individual words with underscore characters (\fB_\fP). 75 | 76 | Usually only \fBmorphstr(\|)\fP is called from applications, as it 77 | works on both words and collocations. 78 | 79 | \fIpos\fP must be one of the following: 80 | 81 | .RS 82 | .nf 83 | \fB1\fP NOUN 84 | \fB2\fP VERB 85 | \fB3\fP ADJECTIVE 86 | \fB4\fP ADVERB 87 | \fB5\fP ADJECTIVE_SATELLITE 88 | .fi 89 | .RE 90 | 91 | If 92 | .SB ADJECTIVE_SATELLITE 93 | is passed, it is treated by \fBmorphstr(\|)\fP as 94 | .SB ADJECTIVE. 95 | .SH SEE ALSO 96 | .BR wnintro (3WN), 97 | .BR wnsearch (3WN), 98 | .BR wndb (5WN), 99 | .BR morphy (7WN). 100 | 101 | .SH WARNINGS 102 | Passing an invalid part of speech will result in a core dump. 103 | 104 | The WordNet database files must be open to use \fBmorphstr(\|)\fP or 105 | \fBmorphword(\|). 106 | 107 | .SH BUGS 108 | Morphy will allow non-words to be converted to words, if they follow 109 | one of the rules described above. For example, it will happily 110 | convert \fBplantes\fP to \fBplants\fP. 111 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/uniqbeg.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .TH UNIQBEG 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" 4 | .SH NAME 5 | uniqbeg \- unique beginners for noun hierarchies 6 | .SH DESCRIPTION 7 | All of the WordNet noun synsets are organized into hierarchies, headed 8 | by the unique beginner synset for \fBentity\fP in the file 9 | \fBnoun.Tops\fP. 10 | 11 | .RS 12 | .nf 13 | { entity (that which is perceived or known or inferred to have its own 14 | distinct existence (living or nonliving)) } 15 | 16 | .fi 17 | .RE 18 | .SH NOTES 19 | The lexicographer files are not included in the WordNet database package. 20 | .SH FILES 21 | .TP 20 22 | .B noun.Tops 23 | unique beginners for nouns 24 | .SH SEE ALSO 25 | .BR wndb (5WN), 26 | .BR wninput (5WN), 27 | .BR wnintro (7WN), 28 | .BR wngloss (7WN). 29 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wngroups.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH WNGROUPS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" 5 | .SH NAME 6 | wngroups \- discussion of WordNet search code to group similar verb senses 7 | .SH DESCRIPTION 8 | Some similar senses of verbs have been grouped by the lexicographers. 9 | This grouping is done statically in the lexicographer source files 10 | using the semantic \fIpointer_symbol\fP \fB$\fP. 11 | Transitivity is used to combine groups of overlapping 12 | senses into the largest sense groups possible. 13 | .SH NOTES 14 | Coverage of verb groups is incomplete. 15 | .SH ENVIRONMENT VARIABLES (UNIX) 16 | .TP 20 17 | .B WNHOME 18 | Base directory for WordNet. Default is 19 | \fB/usr/local/WordNet-3.0\fP. 20 | .TP 20 21 | .B WNSEARCHDIR 22 | Directory in which the WordNet database has been installed. 23 | Default is \fBWNHOME/dict\fP. 24 | .SH REGISTRY (WINDOWS) 25 | .TP 20 26 | .B HKEY_LOCAL_MACHINE\eSOFTWARE\eWordNet\e3.0\eWNHome 27 | Base directory for WordNet. Default is 28 | \fBC:\eProgram~Files\eWordNet\e3.0\fP. 29 | .SH FILES 30 | .TP 20 31 | .B sentidx.vrb 32 | verb sense keys and sentence frame numbers 33 | .TP 20 34 | .B sents.vrb 35 | example sentence frames 36 | .SH SEE ALSO 37 | .BR wn (1WN), 38 | .BR wnb (1WN), 39 | .BR senseidx (5WN), 40 | .BR wnsearch (3WN), 41 | .BR wndb (5WN), 42 | .BR wnintro (7WN). 43 | 44 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnintro.1: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH WNINTRO 1WN "Dec 2006" "WordNet 3.0" "WordNet\(tm User Commands" 5 | .SH NAME 6 | wnintro \- WordNet user commands 7 | .SH SYNOPSIS 8 | .LP 9 | \fBwn\fP \- command line interface to WordNet database 10 | .LP 11 | \fBwnb\fP \- window based WordNet browser 12 | .SH DESCRIPTION 13 | This section of the \fIWordNet Reference Manual\fP contains manual 14 | pages that describe commands available with the various WordNet system 15 | packages. 16 | 17 | The WordNet interfaces 18 | .BR wn (1WN) 19 | and 20 | .BR wnb (1WN) 21 | allow the user to search the WordNet database and display the 22 | information textually. 23 | .SH ENVIRONMENT VARIABLES (UNIX) 24 | .TP 20 25 | .B WNHOME 26 | Base directory for WordNet. Default is 27 | \fB/usr/local/WordNet-3.0\fP. 28 | .TP 20 29 | .B WNSEARCHDIR 30 | Directory in which the WordNet database has been installed. 31 | Default is \fBWNHOME/dict\fP. 32 | .SH REGISTRY (WINDOWS) 33 | .TP 20 34 | .B HKEY_LOCAL_MACHINE\eSOFTWARE\eWordNet\e3.0\eWNHome 35 | Base directory for WordNet. Default is 36 | \fBC:\eProgram~Files\eWordNet\e3.0\fP. 37 | .SH SEE ALSO 38 | .BR grind (1WN), 39 | .BR wn (1WN), 40 | .BR wnb (1WN), 41 | .BR wnintro (3WN), 42 | .BR wnintro (5WN), 43 | .BR wnintro (7WN). 44 | .LP 45 | Fellbaum, C. (1998), ed. 46 | \fI"WordNet: An Electronic Lexical Database"\fP. 47 | MIT Press, Cambridge, MA. 48 | .SH AVAILABILITY 49 | WordNet has a World Wide Web site at 50 | \fBhttp://wordnet.princeton.edu\fP. From this web site 51 | users can learn about the WordNet project, run several different 52 | interfaces to the WordNet database, and download various WordNet 53 | system packages and \fI"Five Papers on WordNet"\fP. 54 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnintro.5: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH WNINTRO 5WN "Dec 2006" "WordNet 3.0" "WordNet\(tm File Formats" 5 | .SH NAME 6 | wnintro \- introduction to descriptions of WordNet file formats 7 | .SH SYNOPSIS 8 | .LP 9 | \fBcntlist\fP \- format of \fBcntlist\fP and \fBcntlist.rev\fP files 10 | .LP 11 | \fBlexnames\fP \- list of lexicographer file names and numbers 12 | .LP 13 | \fBprologdb\fP \- description of Prolog database files 14 | .LP 15 | \fBsenseidx\fP \- format of sense index file 16 | .LP 17 | \fBsensemap\fP \- mapping from senses in WordNet 2.1 to corresponding 18 | 3.0 senses 19 | .LP 20 | \fBwndb\fP \- format of WordNet database files 21 | .LP 22 | \fBwninput\fP \- format of WordNet lexicographer files 23 | .SH DESCRIPTION 24 | This section of the \fIWordNet Reference Manual\fP contains manual pages 25 | that describe the formats of the various files included in different 26 | WordNet 3.0 packages. 27 | .SH NOMENCLATURE 28 | All files are in ASCII. Fields are generally separated by one space, 29 | unless otherwise noted, and each line is terminated with a newline 30 | character. In the file format descriptions, terms in \fIitalics\fP 31 | refer to field names. Characters or strings in \fBboldface\fP 32 | represent an actual character or string as it appears in the file. 33 | Items enclosed in italicized square brackets (\fI[~~]\fP) may not be present. 34 | Since several files contain fields that have the identical meaning, 35 | field names are consistently defined. For example, several WordNet 36 | files contain one or more \fIsynset_offset\fP fields. In each case, 37 | the definition of \fIsynset_offset\fP is identical. 38 | .SH SEE ALSO 39 | .BR wnintro (1WN), 40 | .BR wnintro (3WN), 41 | .BR cntlist (5WN), 42 | .BR lexnames (5WN), 43 | .BR prologdb (5WN), 44 | .BR senseidx (5WN), 45 | .BR sensemap (5WN), 46 | .BR wndb (5WN), 47 | .BR wninput (5WN), 48 | .BR wnintro (7WN), 49 | .BR wngloss (7WN). 50 | .LP 51 | Fellbaum, C. (1998), ed. 52 | \fI"WordNet: An Electronic Lexical Database"\fP. 53 | MIT Press, Cambridge, MA. 54 | 55 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnintro.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH WNINTRO 7WN "Dec 2006" "WordNet 3.0" "Miscellaneous WordNet\(tm Topics" 5 | .SH NAME 6 | wnintro \- introduction to miscellaneous WordNet information 7 | .SH SYNOPSIS 8 | .LP 9 | \fBmorphy\fP \- discussion of WordNet's morphological processing 10 | .LP 11 | \fBuniqbeg\fP \- unique beginners for noun hierarchies 12 | .LP 13 | \fBwngloss\fP \- glossary of terms used in WordNet 14 | .LP 15 | \fBwngroups\fP \- discussion of WordNet search code to group similar senses 16 | .LP 17 | \fBwnlicens\fP \- text of WordNet license agreement 18 | .LP 19 | \fBwnpkgs\fP \- information about WordNet packages and distribution 20 | .LP 21 | \fBwnstats\fP \- database statistics 22 | .SH DESCRIPTION 23 | This section of the \fIWordNet Reference Manual\fP contains manual pages 24 | that describe various topics related to WordNet and the semantic 25 | concordances, and a glossary of terms. 26 | .SH SEE ALSO 27 | .BR wnintro (1WN), 28 | .BR wnintro (3WN), 29 | .BR wnintro (5WN), 30 | .BR morphy (7WN), 31 | .BR uniqbeg (7WN), 32 | .BR wngroups (7WN), 33 | .BR wnlicens (7WN), 34 | .BR wnpkgs (7WN), 35 | .BR wnstats (7WN), 36 | .BR wngloss (7WN). 37 | .LP 38 | Fellbaum, C. (1998), ed. 39 | \fI"WordNet: An Electronic Lexical Database"\fP. 40 | MIT Press, Cambridge, MA. 41 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnlicens.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .TH WNLICENS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" 4 | .SH NAME 5 | wnlicens \- text of WordNet license 6 | .SH DESCRIPTION 7 | WordNet Release 3.0 8 | 9 | This software and database is being provided to you, the LICENSEE, by 10 | Princeton University under the following license. By obtaining, using 11 | and/or copying this software and database, you agree that you have 12 | read, understood, and will comply with these terms and conditions.: 13 | 14 | Permission to use, copy, modify and distribute this software and 15 | database and its documentation for any purpose and without fee or 16 | royalty is hereby granted, provided that you agree to comply with 17 | the following copyright notice and statements, including the disclaimer, 18 | and that the same appear on ALL copies of the software, database and 19 | documentation, including modifications that you make for internal 20 | use or for distribution. 21 | 22 | WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. 23 | 24 | THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON 25 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 26 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON 27 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- 28 | ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE 29 | OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT 30 | INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 31 | OTHER RIGHTS. 32 | 33 | The name of Princeton University or Princeton may not be used in 34 | advertising or publicity pertaining to distribution of the software 35 | and/or database. Title to copyright in this software, database and 36 | any associated documentation shall at all times remain with 37 | Princeton University and LICENSEE agrees to preserve same. 38 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnpkgs.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .tr ~ 4 | .TH WNPKGS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" 5 | .SH NAME 6 | wnpkgs \- description of various WordNet system packages 7 | .SH DESCRIPTION 8 | WordNet 3.0 is distributed in several formats and in various packages. 9 | All of the packages are available via anonymous FTP from 10 | \fBftp.cogsci.princeton.edu\fP and from the WordNet Web 11 | site at \fBhttp://wordnet.princeton.edu\fP. 12 | .SS "Packages Available Via FTP and WWW" 13 | The following WordNet packages can be downloaded using a web browser 14 | from \fBftp://ftp.cogsci.princeton.edu/wordnet/3.0\fP, or 15 | from the Web site noted above. Users can also FTP directly from 16 | \fBftp.cogsci.princeton.edu\fP, directory \fBwordnet/3.0\fP. 17 | 18 | .TS 19 | center box ; 20 | c | c | c | c 21 | lt | l | l | lt. 22 | \fBPackage\fP \fBFilename\fP \fBPlatform\fP \fBDescription\fP 23 | _ 24 | .na 25 | Database \fBWordNet-3.0.tar.gz\fP Unix/OS X T{ 26 | WordNet 3.0 database, interfaces, sense index, interface 27 | and library source code, documentation. 28 | T} 29 | Database \fBWordNet-3.0.exe\fP Windows T{ 30 | WordNet 3.0 database, interfaces, sense index, interface 31 | and library source code, documentation. 32 | T} 33 | Prolog Database \fBWNprolog-3.0.tar.gz\fP All T{ 34 | WordNet 3.0 database files in Prolog-readable format, documentation. 35 | T} 36 | Sense Map \fBWNsnsmap-3.0.tar.gz\fP All T{ 37 | Mapping of 2.1 to 3.0 senses, documentation. 38 | T} 39 | .TE 40 | 41 | .SS "Database Package" 42 | The database package is a complete installation for WordNet 3.0 users. 43 | It includes the 3.0 database files, source code for the WordNet browsers and 44 | library, and documentation. The other packages are not included \- 45 | they must be downloaded and installed separately. 46 | 47 | Note that with this version of WordNet for Unix platforms, only source 48 | code is provided. Users should carefully read the README and INSTALL 49 | files for detailed information on compiling WordNet and dependencies. 50 | 51 | .SS Prolog Database Package 52 | The WordNet 3.0 database files are available in this package in a 53 | Prolog-readable format. Documentation describing the file format is 54 | included. This package is only downloadable in compressed tar file 55 | format, although once unpackaged it can be used from Windows 56 | systems since the files are in ASCII. Many Windows utilities, such as 57 | WinZip, can deal with a 58 | compressed tar file. 59 | .SS Sense Map Package 60 | To help users automatically convert 2.1 noun and verb senses to their 61 | corresponding 3.0 senses, we provide sense mapping information in 62 | this package. This package contains files to map polysemous and 63 | monosemous words, and documentation that describes the format of these 64 | files. As with the Prolog database, this package is only downloadable 65 | in compressed tar format, but the files are also in ASCII. 66 | .SH NOTES 67 | The lexicographer files and 68 | .BR grind (1WN) 69 | program are not generally distributed. 70 | 71 | All of the packages described above may not be available at the time 72 | of release of the 3.0 database package. 73 | .SH SEE ALSO 74 | .BR wnintro (1WN), 75 | .BR wnintro (3WN), 76 | .BR wnintro (5WN), 77 | .BR wnintro (7WN). 78 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/man/wnstats.7: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" $Id$ 3 | .TH WNSTATS 7WN "Dec 2006" "WordNet 3.0" "WordNet\(tm" 4 | .SH NAME 5 | wnstats \- WordNet 3.0 database statistics 6 | .SH DESCRIPTION 7 | .SS Number of words, synsets, and senses 8 | .TS 9 | center box tab(/); 10 | c | c | c | c 11 | c | c | c | c 12 | l | r | r | r. 13 | \fBPOS\fP/\fBUnique\fP/\fBSynsets\fP/\fBTotal\fP 14 | /\fBStrings\fP//\fBWord-Sense Pairs\fP/ 15 | _ 16 | Noun/117798/82115/146312 17 | Verb/11529/13767/25047 18 | Adjective/21479/18156/30002 19 | Adverb/4481/3621/5580 20 | = 21 | Totals/155287/117659/206941 22 | .TE 23 | 24 | .SS Polysemy information 25 | 26 | .TS 27 | center box tab(/); 28 | c | c | c | c 29 | c | c | c | c 30 | l | r | r | r. 31 | \fBPOS\fP/\fBMonosemous\fP/\fBPolysemous\fP/\fBPolysemous\fP 32 | /\fBWords and Senses\fP/\fBWords\fP/\fBSenses\fP 33 | _ 34 | Noun/101863/15935/44449 35 | Verb/6277/5252/18770 36 | Adjective/16503/4976/14399 37 | Adverb/3748/733/1832 38 | = 39 | Totals/128391/26896/79450 40 | .TE 41 | 42 | .TS 43 | center box tab(/); 44 | c | c | c 45 | c | c | c 46 | l | r | r. 47 | \fBPOS\fP/\fBAverage Polysemy\fP/\fBAverage Polysemy\fP 48 | /\fBIncluding Monosemous Words\fP/\fBExcluding Monosemous Words\fP 49 | _ 50 | Noun/1.24/2.79 51 | Verb/2.17/3.57 52 | Adjective/1.40/2.71 53 | Adverb/1.25/2.50 54 | .TE 55 | 56 | .SH NOTES 57 | Statistics for all types of adjectives and adjective satellites are 58 | combined. 59 | 60 | The total of all unique noun, verb, adjective, and adverb strings is 61 | actually 147278. 62 | However, many strings are unique within a 63 | syntactic category, but are in more than one syntactic category. The 64 | figures in the table represent the unique strings in each syntactic category. 65 | 66 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/Makefile.am: -------------------------------------------------------------------------------- 1 | pdfdir=$(prefix)/doc/pdf 2 | pdf_DATA =binsrch.3.pdf cntlist.5.pdf grind.1.pdf lexnames.5.pdf morph.3.pdf morphy.7.pdf senseidx.5.pdf uniqbeg.7.pdf wn.1.pdf wnb.1.pdf wndb.5.pdf wngloss.7.pdf wngroups.7.pdf wninput.5.pdf wnintro.1.pdf wnintro.3.pdf wnintro.5.pdf wnintro.7.pdf wnlicens.7.pdf wnpkgs.7.pdf wnsearch.3.pdf wnstats.7.pdf wnutil.3.pdf 3 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/binsrch.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/binsrch.3.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/cntlist.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/cntlist.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/grind.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/grind.1.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/lexnames.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/lexnames.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/morph.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/morph.3.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/morphy.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/morphy.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/prologdb.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/prologdb.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/senseidx.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/senseidx.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/uniqbeg.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/uniqbeg.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wn.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wn.1.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnb.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnb.1.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wndb.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wndb.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wngloss.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wngloss.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wngroups.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wngroups.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wninput.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wninput.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnintro.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnintro.1.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnintro.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnintro.3.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnintro.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnintro.5.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnintro.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnintro.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnlicens.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnlicens.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnpkgs.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnpkgs.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnsearch.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnsearch.3.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnstats.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnstats.7.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/pdf/wnutil.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/WordNet-3.0/doc/pdf/wnutil.3.pdf -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/doc/ps/Makefile.am: -------------------------------------------------------------------------------- 1 | psdir = $(prefix)/doc/ps 2 | ps_DATA = binsrch.3.ps cntlist.5.ps grind.1.ps lexnames.5.ps morph.3.ps morphy.7.ps senseidx.5.ps uniqbeg.7.ps wn.1.ps wnb.1.ps wndb.5.ps wngloss.7.ps wngroups.7.ps wninput.5.ps wnintro.1.ps wnintro.3.ps wnintro.5.ps wnintro.7.ps wnlicens.7.ps wnpkgs.7.ps wnsearch.3.ps wnstats.7.ps wnutil.3.ps 3 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/lib/wnglobal.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | wnglobal.c - global variables used by various WordNet applications 4 | 5 | $Id: wnglobal.c,v 1.56 2006/11/14 21:00:34 wn Exp $ 6 | 7 | */ 8 | 9 | #ifndef NULL 10 | #define NULL 0 11 | #endif 12 | 13 | char *wnrelease = "3.0"; 14 | 15 | /* Lexicographer file names and numbers */ 16 | 17 | char *lexfiles[] = { 18 | "adj.all", /* 0 */ 19 | "adj.pert", /* 1 */ 20 | "adv.all", /* 2 */ 21 | "noun.Tops", /* 3 */ 22 | "noun.act", /* 4 */ 23 | "noun.animal", /* 5 */ 24 | "noun.artifact", /* 6 */ 25 | "noun.attribute", /* 7 */ 26 | "noun.body", /* 8 */ 27 | "noun.cognition", /* 9 */ 28 | "noun.communication", /* 10 */ 29 | "noun.event", /* 11 */ 30 | "noun.feeling", /* 12 */ 31 | "noun.food", /* 13 */ 32 | "noun.group", /* 14 */ 33 | "noun.location", /* 15 */ 34 | "noun.motive", /* 16 */ 35 | "noun.object", /* 17 */ 36 | "noun.person", /* 18 */ 37 | "noun.phenomenon", /* 19 */ 38 | "noun.plant", /* 20 */ 39 | "noun.possession", /* 21 */ 40 | "noun.process", /* 22 */ 41 | "noun.quantity", /* 23 */ 42 | "noun.relation", /* 24 */ 43 | "noun.shape", /* 25 */ 44 | "noun.state", /* 26 */ 45 | "noun.substance", /* 27 */ 46 | "noun.time", /* 28 */ 47 | "verb.body", /* 29 */ 48 | "verb.change", /* 30 */ 49 | "verb.cognition", /* 31 */ 50 | "verb.communication", /* 32 */ 51 | "verb.competition", /* 33 */ 52 | "verb.consumption", /* 34 */ 53 | "verb.contact", /* 35 */ 54 | "verb.creation", /* 36 */ 55 | "verb.emotion", /* 37 */ 56 | "verb.motion", /* 38 */ 57 | "verb.perception", /* 39 */ 58 | "verb.possession", /* 40 */ 59 | "verb.social", /* 41 */ 60 | "verb.stative", /* 42 */ 61 | "verb.weather", /* 43 */ 62 | "adj.ppl", /* 44 */ 63 | }; 64 | 65 | /* Pointer characters and searches */ 66 | 67 | char *ptrtyp[]={ 68 | "", /* 0 not used */ 69 | "!", /* 1 ANTPTR */ 70 | "@", /* 2 HYPERPTR */ 71 | "~", /* 3 HYPOPTR */ 72 | "*", /* 4 ENTAILPTR */ 73 | "&", /* 5 SIMPTR */ 74 | "#m", /* 6 ISMEMBERPTR */ 75 | "#s", /* 7 ISSTUFFPTR */ 76 | "#p", /* 8 ISPARTPTR */ 77 | "%m", /* 9 HASMEMBERPTR */ 78 | "%s", /* 10 HASSTUFFPTR */ 79 | "%p", /* 11 HASPARTPTR */ 80 | "%", /* 12 MERONYM */ 81 | "#", /* 13 HOLONYM */ 82 | ">", /* 14 CAUSETO */ 83 | "<", /* 15 PPLPTR */ 84 | "^", /* 16 SEEALSO */ 85 | "\\", /* 17 PERTPTR */ 86 | "=", /* 18 ATTRIBUTE */ 87 | "$", /* 19 VERBGROUP */ 88 | "+", /* 20 NOMINALIZATIONS */ 89 | ";", /* 21 CLASSIFICATION */ 90 | "-", /* 22 CLASS */ 91 | /* additional searches, but not pointers. */ 92 | "", /* SYNS */ 93 | "", /* FREQ */ 94 | "+", /* FRAMES */ 95 | "", /* COORDS */ 96 | "", /* RELATIVES */ 97 | "", /* HMERONYM */ 98 | "", /* HHOLONYM */ 99 | "", /* WNGREP */ 100 | "", /* OVERVIEW */ 101 | ";c", /* CLASSIF_CATEGORY */ 102 | ";u", /* CLASSIF_USAGE */ 103 | ";r", /* CLASSIF_REGIONAL */ 104 | "-c", /* CLASS_CATEGORY */ 105 | "-u", /* CLASS_USAGE */ 106 | "-r", /* CLASS_REGIONAL */ 107 | "@i", /* INSTANCE */ 108 | "~i", /* INSTANCES */ 109 | NULL, 110 | }; 111 | 112 | char *partnames[]={ "", "noun", "verb", "adj", "adv", NULL }; 113 | char partchars[] = " nvara"; /* add char for satellites to end */ 114 | char *adjclass[] = { "", "(p)", "(a)", "(ip)" }; 115 | 116 | /* Text of verb sentence frames */ 117 | 118 | char *frametext[] = { 119 | "", 120 | "Something ----s", 121 | "Somebody ----s", 122 | "It is ----ing", 123 | "Something is ----ing PP", 124 | "Something ----s something Adjective/Noun", 125 | "Something ----s Adjective/Noun", 126 | "Somebody ----s Adjective", 127 | "Somebody ----s something", 128 | "Somebody ----s somebody", 129 | "Something ----s somebody", 130 | "Something ----s something", 131 | "Something ----s to somebody", 132 | "Somebody ----s on something", 133 | "Somebody ----s somebody something", 134 | "Somebody ----s something to somebody", 135 | "Somebody ----s something from somebody", 136 | "Somebody ----s somebody with something", 137 | "Somebody ----s somebody of something", 138 | "Somebody ----s something on somebody", 139 | "Somebody ----s somebody PP", 140 | "Somebody ----s something PP", 141 | "Somebody ----s PP", 142 | "Somebody's (body part) ----s", 143 | "Somebody ----s somebody to INFINITIVE", 144 | "Somebody ----s somebody INFINITIVE", 145 | "Somebody ----s that CLAUSE", 146 | "Somebody ----s to somebody", 147 | "Somebody ----s to INFINITIVE", 148 | "Somebody ----s whether INFINITIVE", 149 | "Somebody ----s somebody into V-ing something", 150 | "Somebody ----s something with something", 151 | "Somebody ----s INFINITIVE", 152 | "Somebody ----s VERB-ing", 153 | "It ----s that CLAUSE", 154 | "Something ----s INFINITIVE", 155 | "" 156 | }; 157 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/lib/wnres/license.txt: -------------------------------------------------------------------------------- 1 | WordNet Release 3.0 2 | 3 | This software and database is being provided to you, the LICENSEE, by 4 | Princeton University under the following license. By obtaining, using 5 | and/or copying this software and database, you agree that you have 6 | read, understood, and will comply with these terms and conditions.: 7 | 8 | Permission to use, copy, modify and distribute this software and 9 | database and its documentation for any purpose and without fee or 10 | royalty is hereby granted, provided that you agree to comply with 11 | the following copyright notice and statements, including the disclaimer, 12 | and that the same appear on ALL copies of the software, database and 13 | documentation, including modifications that you make for internal 14 | use or for distribution. 15 | 16 | WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. 17 | 18 | THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON 19 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR 20 | IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON 21 | UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT- 22 | ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE 23 | OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT 24 | INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 25 | OTHER RIGHTS. 26 | 27 | The name of Princeton University or Princeton may not be used in 28 | advertising or publicity pertaining to distribution of the software 29 | and/or database. Title to copyright in this software, database and 30 | any associated documentation shall at all times remain with 31 | Princeton University and LICENSEE agrees to preserve same. 32 | 33 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/lib/wnrtl.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | wnrtl.c - global variables used by WordNet Run Time Library 4 | 5 | */ 6 | 7 | #include 8 | #include "wn.h" 9 | 10 | static char *Id = "$Id: wnrtl.c,v 1.8 2005/01/27 17:33:54 wn Rel $"; 11 | 12 | /* Search code variables and flags */ 13 | 14 | SearchResults wnresults; /* structure containing results of search */ 15 | 16 | int fnflag = 0; /* if set, print lex filename after sense */ 17 | int dflag = 1; /* if set, print definitional glosses */ 18 | int saflag = 1; /* if set, print SEE ALSO pointers */ 19 | int fileinfoflag = 0; /* if set, print lex file info on synsets */ 20 | int frflag = 0; /* if set, print verb frames */ 21 | int abortsearch = 0; /* if set, stop search algorithm */ 22 | int offsetflag = 0; /* if set, print byte offset of each synset */ 23 | int wnsnsflag = 0; /* if set, print WN sense # for each word */ 24 | 25 | /* File pointers for database files */ 26 | 27 | int OpenDB = 0; /* if non-zero, database file are open */ 28 | FILE *datafps[NUMPARTS + 1] = { NULL, NULL, NULL, NULL, NULL } , 29 | *indexfps[NUMPARTS + 1] = { NULL, NULL, NULL, NULL, NULL } , 30 | *sensefp = NULL, 31 | *cntlistfp = NULL, 32 | *keyindexfp = NULL, 33 | *revkeyindexfp = NULL, 34 | *vsentfilefp = NULL, *vidxfilefp = NULL; 35 | 36 | /* Method for interface to check for events while search is running */ 37 | 38 | void (*interface_doevents_func)(void) = NULL; 39 | /* callback function for interruptable searches */ 40 | /* in single-threaded interfaces */ 41 | 42 | /* General error message handler - can be defined by interface. 43 | Default function provided in library returns -1 */ 44 | 45 | int default_display_message(char *); 46 | int (*display_message)(char *) = default_display_message; 47 | 48 | /* 49 | Revsion log: 50 | 51 | $Log: wnrtl.c,v $ 52 | Revision 1.8 2005/01/27 17:33:54 wn 53 | cleaned up includes 54 | 55 | Revision 1.7 2005/01/27 16:31:17 wn 56 | removed cousinfp for 1.6 57 | 58 | Revision 1.6 2002/03/22 20:29:58 wn 59 | added revkeyindexfp 60 | 61 | Revision 1.5 2001/10/11 18:03:02 wn 62 | initialize keyindexfp 63 | 64 | Revision 1.4 2001/03/27 18:48:15 wn 65 | added cntlistfp 66 | 67 | Revision 1.3 2001/03/13 17:45:48 wn 68 | *** empty log message *** 69 | 70 | Revision 1.2 2000/08/14 16:05:06 wn 71 | added tcflag 72 | 73 | Revision 1.1 1997/09/02 16:31:18 wn 74 | Initial revision 75 | 76 | 77 | */ 78 | -------------------------------------------------------------------------------- /DeepQASupport/WordNet-3.0/src/tkAppInit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * tkAppInit.c -- 3 | * 4 | * Provides a default version of the Tcl_AppInit procedure for 5 | * use in wish and similar Tk-based applications. 6 | * 7 | * Copyright (c) 1993 The Regents of the University of California. 8 | * Copyright (c) 1994-1997 Sun Microsystems, Inc. 9 | * 10 | * See the file "license.terms" for information on usage and redistribution 11 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 12 | * 13 | * RCS: @(#) $Id: tkAppInit.c,v 1.5 2005/02/01 17:35:34 wn Rel $ 14 | */ 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | /* 21 | * The following variable is a special hack that is needed in order for 22 | * Sun shared libraries to be used for Tcl. 23 | */ 24 | 25 | #ifdef __sun__ 26 | extern int matherr(); 27 | int *tclDummyMathPtr = (int *) matherr; 28 | #endif 29 | 30 | #ifdef TK_TEST 31 | extern int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp)); 32 | extern int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp)); 33 | #endif /* TK_TEST */ 34 | 35 | /* 36 | *---------------------------------------------------------------------- 37 | * 38 | * main -- 39 | * 40 | * This is the main program for the application. 41 | * 42 | * Results: 43 | * None: Tk_Main never returns here, so this procedure never 44 | * returns either. 45 | * 46 | * Side effects: 47 | * Whatever the application does. 48 | * 49 | *---------------------------------------------------------------------- 50 | */ 51 | 52 | int 53 | main(argc, argv) 54 | int argc; /* Number of command-line arguments. */ 55 | char **argv; /* Values of command-line arguments. */ 56 | { 57 | /* 58 | * The following #if block allows you to change the AppInit 59 | * function by using a #define of TCL_LOCAL_APPINIT instead 60 | * of rewriting this entire file. The #if checks for that 61 | * #define and uses Tcl_AppInit if it doesn't exist. 62 | */ 63 | 64 | #ifndef TK_LOCAL_APPINIT 65 | #define TK_LOCAL_APPINIT Tcl_AppInit 66 | #endif 67 | extern int TK_LOCAL_APPINIT _ANSI_ARGS_((Tcl_Interp *interp)); 68 | 69 | /* 70 | * The following #if block allows you to change how Tcl finds the startup 71 | * script, prime the library or encoding paths, fiddle with the argv, 72 | * etc., without needing to rewrite Tk_Main() 73 | */ 74 | 75 | #ifdef TK_LOCAL_MAIN_HOOK 76 | extern int TK_LOCAL_MAIN_HOOK _ANSI_ARGS_((int *argc, char ***argv)); 77 | TK_LOCAL_MAIN_HOOK(&argc, &argv); 78 | #endif 79 | 80 | #ifdef _WINDOWS 81 | argv[argc++] = "wnb.tcl"; 82 | #endif 83 | 84 | Tk_Main(argc, argv, TK_LOCAL_APPINIT); 85 | return 0; /* Needed only to prevent compiler warning. */ 86 | } 87 | 88 | /* 89 | *---------------------------------------------------------------------- 90 | * 91 | * Tcl_AppInit -- 92 | * 93 | * This procedure performs application-specific initialization. 94 | * Most applications, especially those that incorporate additional 95 | * packages, will have their own version of this procedure. 96 | * 97 | * Results: 98 | * Returns a standard Tcl completion code, and leaves an error 99 | * message in the interp's result if an error occurs. 100 | * 101 | * Side effects: 102 | * Depends on the startup script. 103 | * 104 | *---------------------------------------------------------------------- 105 | */ 106 | 107 | extern int Wordnet_Init(Tcl_Interp *interp); 108 | 109 | int 110 | Tcl_AppInit(interp) 111 | Tcl_Interp *interp; /* Interpreter for application. */ 112 | { 113 | if (Tcl_Init(interp) == TCL_ERROR) { 114 | return TCL_ERROR; 115 | } 116 | if (Tk_Init(interp) == TCL_ERROR) { 117 | return TCL_ERROR; 118 | } 119 | Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit); 120 | #ifdef TK_TEST 121 | if (Tcltest_Init(interp) == TCL_ERROR) { 122 | return TCL_ERROR; 123 | } 124 | Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, 125 | (Tcl_PackageInitProc *) NULL); 126 | if (Tktest_Init(interp) == TCL_ERROR) { 127 | return TCL_ERROR; 128 | } 129 | Tcl_StaticPackage(interp, "Tktest", Tktest_Init, 130 | (Tcl_PackageInitProc *) NULL); 131 | #endif /* TK_TEST */ 132 | 133 | 134 | /* 135 | * Call the init procedures for included packages. Each call should 136 | * look like this: 137 | * 138 | * if (Mod_Init(interp) == TCL_ERROR) { 139 | * return TCL_ERROR; 140 | * } 141 | * 142 | * where "Mod" is the name of the module. 143 | */ 144 | 145 | if (Wordnet_Init(interp) == TCL_ERROR) { 146 | return TCL_ERROR; 147 | } 148 | 149 | 150 | /* 151 | * Call Tcl_CreateCommand for application-specific commands, if 152 | * they weren't already created by the init procedures called above. 153 | */ 154 | 155 | /* 156 | * Specify a user-specific startup file to invoke if the application 157 | * is run interactively. Typically the startup file is "~/.apprc" 158 | * where "app" is the name of the application. If this line is deleted 159 | * then no user-specific startup file will be run under any conditions. 160 | */ 161 | 162 | Tcl_SetVar(interp, "tcl_rcFileName", "~/.wishrc", TCL_GLOBAL_ONLY); 163 | return TCL_OK; 164 | } 165 | -------------------------------------------------------------------------------- /DeepQASupport/data/stopwords.txt: -------------------------------------------------------------------------------- 1 | a 2 | about 3 | above 4 | after 5 | again 6 | against 7 | all 8 | am 9 | an 10 | and 11 | any 12 | are 13 | aren't 14 | as 15 | at 16 | be 17 | because 18 | been 19 | before 20 | being 21 | below 22 | between 23 | both 24 | but 25 | by 26 | can't 27 | cannot 28 | could 29 | couldn't 30 | did 31 | didn't 32 | do 33 | does 34 | doesn't 35 | doing 36 | don't 37 | down 38 | during 39 | each 40 | few 41 | for 42 | from 43 | further 44 | had 45 | hadn't 46 | has 47 | hasn't 48 | have 49 | haven't 50 | having 51 | he 52 | he'd 53 | he'll 54 | he's 55 | her 56 | here 57 | here's 58 | hers 59 | herself 60 | him 61 | himself 62 | his 63 | how 64 | how's 65 | i 66 | i'd 67 | i'll 68 | i'm 69 | i've 70 | if 71 | in 72 | into 73 | is 74 | isn't 75 | it 76 | it's 77 | its 78 | itself 79 | let's 80 | me 81 | more 82 | most 83 | mustn't 84 | my 85 | myself 86 | no 87 | nor 88 | not 89 | of 90 | off 91 | on 92 | once 93 | only 94 | or 95 | other 96 | ought 97 | our 98 | ours 99 | ourselves 100 | out 101 | over 102 | own 103 | same 104 | shan't 105 | she 106 | she'd 107 | she'll 108 | she's 109 | should 110 | shouldn't 111 | so 112 | some 113 | such 114 | than 115 | that 116 | that's 117 | the 118 | their 119 | theirs 120 | them 121 | themselves 122 | then 123 | there 124 | there's 125 | these 126 | they 127 | they'd 128 | they'll 129 | they're 130 | they've 131 | this 132 | those 133 | through 134 | to 135 | too 136 | under 137 | until 138 | up 139 | very 140 | was 141 | wasn't 142 | we 143 | we'd 144 | we'll 145 | we're 146 | we've 147 | were 148 | weren't 149 | what 150 | what's 151 | when 152 | when's 153 | where 154 | where's 155 | which 156 | while 157 | who 158 | who's 159 | whom 160 | why 161 | why's 162 | with 163 | won't 164 | would 165 | wouldn't 166 | you 167 | you'd 168 | you'll 169 | you're 170 | you've 171 | your 172 | yours 173 | yourself 174 | yourselves -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/ant-1.8.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/ant-1.8.2.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/commons-io-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/commons-io-2.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/httpclient-4.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/httpclient-4.3.1.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/httpcore-4.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/httpcore-4.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/httpmime-4.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/httpmime-4.3.1.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/junit-4.10.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/junit-4.10.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/junit4-ant-2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/junit4-ant-2.1.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-common-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-common-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-icu-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-icu-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-kuromoji-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-kuromoji-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-morfologik-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-morfologik-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-phonetic-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-phonetic-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-smartcn-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-smartcn-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-stempel-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-stempel-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-uima-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-analyzers-uima-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-codecs-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-codecs-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-core-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-core-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-expressions-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-expressions-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-grouping-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-grouping-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-highlighter-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-highlighter-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-join-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-join-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-memory-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-memory-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-misc-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-misc-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-queries-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-queries-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-queryparser-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-queryparser-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-spatial-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-spatial-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-suggest-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-suggest-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/lucene-test-framework-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/lucene-test-framework-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/noggit-0.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/noggit-0.5.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/post.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/post.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/randomizedtesting-runner-2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/randomizedtesting-runner-2.1.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/slf4j-api-1.7.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/slf4j-api-1.7.6.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-analysis-extras-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-analysis-extras-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-cell-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-cell-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-clustering-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-clustering-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-core-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-core-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-dataimporthandler-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-dataimporthandler-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-dataimporthandler-extras-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-dataimporthandler-extras-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-langid-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-langid-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-map-reduce-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-map-reduce-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-morphlines-cell-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-morphlines-cell-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-morphlines-core-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-morphlines-core-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-solrj-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-solrj-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-test-framework-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-test-framework-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-uima-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-uima-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/solr-velocity-4.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/solr-velocity-4.9.0.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/wstx-asl-3.2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/wstx-asl-3.2.7.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_lucene_solr_complete/zookeeper-3.4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_lucene_solr_complete/zookeeper-3.4.6.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/.DS_Store -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/commons-codec-1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/commons-codec-1.6.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/commons-io-2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/commons-io-2.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/commons-lang3-3.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/commons-lang3-3.3.2.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/commons-logging-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/commons-logging-1.1.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/httpclient-4.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/httpclient-4.3.1.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/httpcore-4.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/httpcore-4.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/httpmime-4.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/httpmime-4.3.1.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/jaws-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/jaws-bin.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/jwnl-1.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/jwnl-1.3.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/noggit-0.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/noggit-0.5.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/opennlp-maxent-3.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/opennlp-maxent-3.0.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/opennlp-tools-1.5.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/opennlp-tools-1.5.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/opennlp-uima-1.5.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/opennlp-uima-1.5.3.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/slf4j-api-1.7.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/slf4j-api-1.7.6.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/slf4j-simple-1.7.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/slf4j-simple-1.7.7.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/wstx-asl-3.2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/wstx-asl-3.2.7.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_opennlp_wordnet/zookeeper-3.4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_opennlp_wordnet/zookeeper-3.4.6.jar -------------------------------------------------------------------------------- /DeepQASupport/jars_others/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/jars_others/log4j-1.2.17.jar -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/.DS_Store -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-answer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-answer.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-category.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-category.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-category.bin.cpgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-category.bin.cpgz -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-chunker.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-chunker.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-date.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-date.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-location.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-location.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-money.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-money.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-organization.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-organization.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-percentage.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-percentage.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-person.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-person.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-ner-time.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-ner-time.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-parser-chunking.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-parser-chunking.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-pos-maxent.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-pos-maxent.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-pos-perceptron.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-pos-perceptron.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-sent.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-sent.bin -------------------------------------------------------------------------------- /DeepQASupport/opennlp_models/en-token.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/DeepQASupport/opennlp_models/en-token.bin -------------------------------------------------------------------------------- /SimilarityUtils/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/.DS_Store -------------------------------------------------------------------------------- /SimilarityUtils/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SimilarityUtils/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SimilarityUtils 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /SimilarityUtils/bin/.gitignore: -------------------------------------------------------------------------------- 1 | /domain_independent.txt 2 | /gov/ 3 | /ic-bnc-resnik-add1.dat 4 | /wordnet.xml 5 | -------------------------------------------------------------------------------- /SimilarityUtils/bin/domain_independent.txt: -------------------------------------------------------------------------------- 1 | #These are semantic class labels which we may want to use 2 | #in any domain (the senses are for WordNet 2) 3 | namperson person#n#1 4 | namcompany organisation#n#3 5 | namorganisation organisation#n#3 6 | nampost post#n#3 7 | namlocation geographic_area#n#1 8 | nammoney money#n#1 9 | namdate day#n#2 10 | 11 | #These are domain dependent tags which could actually appear 12 | #in any documents and don't change depending on the domain of the 13 | #document being considered 14 | namprotein protein#n#1 -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/StringSimilarity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/StringSimilarity.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/AbstractSchemaSimilarityByWordNet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/AbstractSchemaSimilarityByWordNet.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_Cosine.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_Cosine.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_CosineTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_CosineTest.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_ICofWN.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_ICofWN.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_Jaccard.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_Jaccard.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Cosine.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Cosine.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_IC_Cosine.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_IC_Cosine.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Jaccard.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Jaccard.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/similaritymetrics/CosineSimilarity2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/similaritymetrics/CosineSimilarity2.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/similaritymetrics/JaccardSimilarity2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/similaritymetrics/JaccardSimilarity2.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/utils/WordInformationContents.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/utils/WordInformationContents.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/utils/WordStringUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/bin/gov/nist/msi/ssmpi/similarity/utils/WordStringUtils.class -------------------------------------------------------------------------------- /SimilarityUtils/bin/wordnet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /SimilarityUtils/lib/JWordNetSim.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/JWordNetSim.jar -------------------------------------------------------------------------------- /SimilarityUtils/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /SimilarityUtils/lib/edu.mit.jwi_1.1.2_jdk.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/edu.mit.jwi_1.1.2_jdk.jar -------------------------------------------------------------------------------- /SimilarityUtils/lib/javawordnetsim.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/javawordnetsim.jar -------------------------------------------------------------------------------- /SimilarityUtils/lib/jwnl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/jwnl.jar -------------------------------------------------------------------------------- /SimilarityUtils/lib/simmetrics.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SimilarityUtils/lib/simmetrics.jar -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/StringSimilarity.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity; 2 | 3 | public interface StringSimilarity { 4 | float getSimilarity(String s, String t); 5 | } 6 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/AbstractSchemaSimilarityByWordNet.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import java.net.MalformedURLException; 4 | import java.net.URL; 5 | import java.util.HashMap; 6 | import java.util.SortedSet; 7 | 8 | import edu.mit.jwi.dict.Dictionary; 9 | import edu.mit.jwi.dict.IDictionary; 10 | import edu.mit.jwi.item.IIndexWord; 11 | import edu.mit.jwi.item.IWord; 12 | import edu.mit.jwi.item.IWordID; 13 | import edu.mit.jwi.item.PartOfSpeech; 14 | import edu.mit.jwi.morph.WordnetStemmer; 15 | import gov.nist.msi.ssmpi.similarity.utils.WordStringUtils; 16 | 17 | /** 18 | * @author Jaewook Kim 19 | * 20 | */ 21 | public abstract class AbstractSchemaSimilarityByWordNet { 22 | 23 | private static IDictionary dict = null; 24 | private static HashMap cachedWordGross = new HashMap(); 25 | private static HashMap cachedWordNetDef = new HashMap(); 26 | 27 | public AbstractSchemaSimilarityByWordNet() { 28 | super(); 29 | initWordNetDb(); 30 | } 31 | 32 | private void initWordNetDb() { 33 | if (dict == null) { 34 | String wnhome = "/Users/914957/Documents/DeepQA/DeepQASupport/WordNet-3.0/"; 35 | String separator = System.getProperty("file.separator"); 36 | String path = wnhome + separator + "dict"; 37 | URL url = null; 38 | try { 39 | url = new URL("file", null, path); 40 | } catch (MalformedURLException e) { 41 | e.printStackTrace(); 42 | } 43 | if (url == null) 44 | return; 45 | 46 | // construct the dictionary object and open it 47 | dict = new Dictionary(url); 48 | dict.open(); 49 | } 50 | } 51 | 52 | protected String getWordNetDef(final String text) { 53 | if (cachedWordNetDef.containsKey(text)) { 54 | return cachedWordNetDef.get(text); 55 | } 56 | 57 | String text2 = WordStringUtils.generateMultiWordString(text); 58 | String[] wordList = text2.split(" "); 59 | 60 | StringBuffer textDef = new StringBuffer(text + " "); 61 | for (String wordString : wordList) { 62 | String mergedWordGloss; 63 | if (cachedWordGross.containsKey(wordString)) { 64 | mergedWordGloss = cachedWordGross.get(wordString); 65 | } 66 | else { 67 | StringBuffer mergedWordGlossBuffer = new StringBuffer(""); 68 | for (PartOfSpeech pos : PartOfSpeech.values()) { 69 | WordnetStemmer stem = new WordnetStemmer(dict); 70 | SortedSet wordRoots = stem.getRoots(wordString, pos); 71 | if (wordRoots == null) continue; 72 | IIndexWord idxWord = dict.getIndexWord(wordRoots.first(), pos); 73 | if (idxWord != null) { 74 | IWordID[] wordIdList = idxWord.getWordIDs(); 75 | for (IWordID wordID : wordIdList) { 76 | IWord word = dict.getWord(wordID); 77 | String wordGloss = word.getGloss(); 78 | if (wordGloss.indexOf(';') > 0) { 79 | wordGloss = wordGloss.substring(0, wordGloss.indexOf(';')); 80 | } 81 | mergedWordGlossBuffer.append(wordGloss + " "); 82 | } 83 | } 84 | } 85 | 86 | mergedWordGloss = mergedWordGlossBuffer.toString(); 87 | cachedWordGross.put(wordString, mergedWordGloss); 88 | } 89 | 90 | textDef.append(mergedWordGloss); 91 | } 92 | 93 | String wordNetDef = WordStringUtils.removeStopwords(textDef.toString().toLowerCase()); 94 | cachedWordNetDef.put(text, wordNetDef); 95 | 96 | return wordNetDef; 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_Cosine.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import gov.nist.msi.ssmpi.similarity.utils.WordStringUtils; 5 | import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; 6 | import uk.ac.shef.wit.simmetrics.similaritymetrics.CosineSimilarity; 7 | 8 | /** 9 | * @author Jaewook Kim 10 | * 11 | */ 12 | public class SSTop_Cosine implements 13 | StringSimilarity { 14 | 15 | public SSTop_Cosine() { 16 | super(); 17 | // TODO Auto-generated constructor stub 18 | } 19 | 20 | @Override 21 | public float getSimilarity(String s, String t) { 22 | String source = WordStringUtils.generateMultiWordString(s); 23 | String target = WordStringUtils.generateMultiWordString(t); 24 | AbstractStringMetric metric = new CosineSimilarity(); 25 | float sim = metric.getSimilarity(source, target); 26 | return sim; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_ICofWN.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import gov.nist.msi.ssmpi.similarity.utils.WordStringUtils; 5 | 6 | import java.io.FileInputStream; 7 | import java.io.FileNotFoundException; 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | 11 | import net.didion.jwnl.JWNL; 12 | import net.didion.jwnl.JWNLException; 13 | import shef.nlp.wordnet.similarity.SimilarityMeasure; 14 | 15 | /** 16 | * @author Jaewook Kim 17 | * 18 | */ 19 | public class SSTop_ICofWN implements StringSimilarity { 20 | 21 | SimilarityMeasure simMeasure; 22 | 23 | public SSTop_ICofWN() { 24 | super(); 25 | // Initialize WordNet - this must be done before you try 26 | // and create a similarity measure otherwise nasty things 27 | // might happen! 28 | try { 29 | JWNL.initialize(new FileInputStream("test/wordnet.xml")); 30 | 31 | // Create a map to hold the similarity config params 32 | Map params = new HashMap(); 33 | 34 | // the simType parameter is the class name of the measure to use 35 | params.put("simType", "shef.nlp.wordnet.similarity.JCn"); 36 | 37 | // this param should be the URL to an infocontent file (if required 38 | // by the similarity measure being loaded) 39 | params.put("infocontent", "file:test/ic-bnc-resnik-add1.dat"); 40 | 41 | // this param should be the URL to a mapping file if the 42 | // user needs to make synset mappings 43 | params.put("mapping", "file:test/domain_independent.txt"); 44 | 45 | // create the similarity measure 46 | simMeasure = SimilarityMeasure.newInstance(params); 47 | // System.out.println("simMeasure configured."); 48 | } catch (FileNotFoundException e) { 49 | // TODO Auto-generated catch block 50 | e.printStackTrace(); 51 | } catch (JWNLException e) { 52 | // TODO Auto-generated catch block 53 | e.printStackTrace(); 54 | } catch (Exception e) { 55 | // TODO Auto-generated catch block 56 | e.printStackTrace(); 57 | } 58 | } 59 | 60 | @Override 61 | public float getSimilarity(String s, String t) { 62 | 63 | float sim = 0; 64 | String[] sourceList = WordStringUtils.generateMultiWordString(s).split( 65 | " "); 66 | String[] targetList = WordStringUtils.generateMultiWordString(t).split( 67 | " "); 68 | 69 | float sSimSum = 0; 70 | for (String source : sourceList) { 71 | float best = 0; 72 | for (String target : targetList) { 73 | try { 74 | sim = (float) simMeasure.getSimilarity(source, target) 75 | .getSimilarity(); 76 | if (sim > 5.1472476E9) { 77 | sim = 1; 78 | } 79 | if (best < sim) { 80 | best = sim; 81 | } 82 | } catch (JWNLException e) { 83 | e.printStackTrace(); 84 | } 85 | } 86 | sSimSum += best; 87 | } 88 | float sSim = sSimSum / sourceList.length; 89 | 90 | float tSimSum = 0; 91 | for (String target : targetList) { 92 | float best = 0; 93 | for (String source : sourceList) { 94 | try { 95 | sim = (float) simMeasure.getSimilarity(source, target) 96 | .getSimilarity(); 97 | if (sim > 5.1472476E9) { 98 | sim = 1; 99 | } 100 | if (best < sim) { 101 | best = sim; 102 | } 103 | } catch (JWNLException e) { 104 | e.printStackTrace(); 105 | } 106 | } 107 | tSimSum += best; 108 | } 109 | float tSim = tSimSum / targetList.length; 110 | 111 | sim = (sSim + tSim) / 2; 112 | 113 | return sim; 114 | } 115 | } -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_Jaccard.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import gov.nist.msi.ssmpi.similarity.utils.WordStringUtils; 5 | import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; 6 | import uk.ac.shef.wit.simmetrics.similaritymetrics.JaccardSimilarity; 7 | 8 | /** 9 | * @author Jaewook Kim 10 | * 11 | */ 12 | public class SSTop_Jaccard implements 13 | StringSimilarity { 14 | 15 | public SSTop_Jaccard() { 16 | super(); 17 | // TODO Auto-generated constructor stub 18 | } 19 | 20 | @Override 21 | public float getSimilarity(String s, String t) { 22 | String source = WordStringUtils 23 | .generateMultiWordString(s); 24 | String target = WordStringUtils 25 | .generateMultiWordString(t); 26 | AbstractStringMetric metric = new JaccardSimilarity(); 27 | float sim = metric.getSimilarity(source, target); 28 | return sim; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Cosine.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import gov.nist.msi.ssmpi.similarity.similaritymetrics.CosineSimilarity2; 5 | import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; 6 | 7 | /** 8 | * @author Jaewook Kim 9 | * 10 | */ 11 | public class SSTop_WN_Cosine extends AbstractSchemaSimilarityByWordNet 12 | implements StringSimilarity { 13 | 14 | public SSTop_WN_Cosine() { 15 | super(); 16 | } 17 | 18 | @Override 19 | public float getSimilarity(String s, String t) { 20 | 21 | String sourceDef = getWordNetDef(s); 22 | String targetDef = getWordNetDef(t); 23 | 24 | AbstractStringMetric metric = new CosineSimilarity2(); 25 | float sim = metric.getSimilarity(sourceDef, targetDef); 26 | return sim; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_IC_Cosine.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import gov.nist.msi.ssmpi.similarity.similaritymetrics.CosineSimilarity2; 5 | import gov.nist.msi.ssmpi.similarity.utils.WordInformationContents; 6 | import gov.nist.msi.ssmpi.similarity.utils.WordStringUtils; 7 | 8 | import java.util.HashMap; 9 | 10 | import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; 11 | 12 | /** 13 | * @author Jaewook Kim 14 | * 15 | */ 16 | public class SSTop_WN_IC_Cosine extends AbstractSchemaSimilarityByWordNet implements StringSimilarity{ 17 | private WordInformationContents icHandler; 18 | private HashMap cachedDef = new HashMap(); 19 | 20 | public SSTop_WN_IC_Cosine() { 21 | super(); 22 | icHandler = new WordInformationContents(); 23 | } 24 | 25 | public SSTop_WN_IC_Cosine(String[] informationList) { 26 | icHandler = new WordInformationContents(informationList); 27 | } 28 | 29 | private String getFixedLenWNDef(String name) { 30 | 31 | if (name.trim().length() == 0) { 32 | System.out 33 | .println("getFixedLenWNDef(String) - SSTop_WN_IC_Cosine: warn: empty string"); //$NON-NLS-1$ 34 | return ""; 35 | } 36 | 37 | if (cachedDef.containsKey(name)) { 38 | return cachedDef.get(name); 39 | } 40 | 41 | int FIXED_WNDEF_LEN = 200; 42 | 43 | // get the sum of the information contents of all splitted words 44 | double sumIC = 0; 45 | String text2 = WordStringUtils.generateMultiWordString(name); 46 | String[] wordList = text2.split(" "); 47 | for (String string : wordList) { 48 | string = string.trim(); 49 | if (string.length() == 0) { 50 | System.out 51 | .println("getFixedLenWNDef(String) - SSTop_WN_IC_Cosine: warn: empty string in list"); //$NON-NLS-1$ 52 | continue; 53 | } 54 | sumIC += icHandler.getPI(string); 55 | } 56 | 57 | StringBuffer fixedLenDef = new StringBuffer(); 58 | // get the fixed lengh wordnet definition; 59 | // merging the definitions of all splitted words according to ratio 60 | // length 61 | for (String string : wordList) { 62 | string = string.trim(); 63 | double icValue = icHandler.getPI(string); 64 | double ratioEffect = icValue / sumIC; 65 | int ratioWordLen = (int) (FIXED_WNDEF_LEN * ratioEffect); 66 | 67 | String def = getWordNetDef(string); 68 | 69 | String[] defSplit = def.split(" "); 70 | 71 | if (defSplit.length == 0) { 72 | System.out 73 | .println("getFixedLenWNDef(String) - SSTop_WN_IC_Cosine: info: no wordnet def: " + string); //$NON-NLS-1$ 74 | continue; 75 | } 76 | 77 | for (int i = 0; i < ratioWordLen; i++) { 78 | int defSplitIndex = i % defSplit.length; 79 | fixedLenDef.append(defSplit[defSplitIndex] + " "); 80 | } 81 | } 82 | 83 | String fixedLenDefStr = fixedLenDef.toString(); 84 | cachedDef.put(name, fixedLenDefStr); 85 | return fixedLenDefStr; 86 | } 87 | 88 | @Override 89 | public float getSimilarity(String s, String t) { 90 | String sNodeDef = getFixedLenWNDef(s); 91 | String tNodeDef = getFixedLenWNDef(t); 92 | 93 | AbstractStringMetric metric = new CosineSimilarity2(); 94 | float sim = metric.getSimilarity(sNodeDef, tNodeDef); 95 | return sim; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/impl/SSTop_WN_Jaccard.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | import uk.ac.shef.wit.simmetrics.similaritymetrics.AbstractStringMetric; 5 | import uk.ac.shef.wit.simmetrics.similaritymetrics.JaccardSimilarity; 6 | 7 | /** 8 | * @author Jaewook Kim 9 | * 10 | */ 11 | public class SSTop_WN_Jaccard extends AbstractSchemaSimilarityByWordNet 12 | implements StringSimilarity { 13 | 14 | public SSTop_WN_Jaccard() { 15 | super(); 16 | } 17 | 18 | @Override 19 | public float getSimilarity(String s, String t) { 20 | String sourceDef = getWordNetDef(s); 21 | String targetDef = getWordNetDef(t); 22 | 23 | // AbstractStringMetric metric = new MongeElkan(); 24 | AbstractStringMetric metric = new JaccardSimilarity(); 25 | float sim = metric.getSimilarity(sourceDef, targetDef); 26 | // System.out.println(source + " : " + target + " = " + sim); 27 | return sim; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/utils/WordInformationContents.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.utils; 2 | 3 | import java.util.Hashtable; 4 | 5 | 6 | /** 7 | * @author Jaewook Kim 8 | * 9 | */ 10 | public class WordInformationContents { 11 | 12 | private long totalTermsPopulation = 0; 13 | private Hashtable totalTermsFreqMap; 14 | 15 | public WordInformationContents() { 16 | super(); 17 | } 18 | 19 | public WordInformationContents(String[] t) { 20 | calculatePI(t); 21 | } 22 | 23 | private void addTermFreq(String[] nodeList) { 24 | 25 | for (String node : nodeList) { 26 | String text2 = WordStringUtils.generateMultiWordString(node); 27 | String[] wordList = text2.split(" "); 28 | for (String string : wordList) { 29 | string = string.trim(); 30 | Long count = totalTermsFreqMap.get(string); 31 | if ( count == null) 32 | count = 0L; 33 | 34 | totalTermsFreqMap.put(string, ++count); 35 | totalTermsPopulation++; 36 | } 37 | } 38 | } 39 | /** 40 | * calculate Atoms' probability information again 41 | * after merging the population of the source and target atoms. 42 | * This should be called before calculating the similarities. 43 | */ 44 | protected void calculatePI(String[] t) { 45 | totalTermsFreqMap = new Hashtable(); 46 | 47 | totalTermsPopulation = 0; 48 | 49 | addTermFreq(t); 50 | } 51 | 52 | /** 53 | * @param atom 54 | * @return 55 | */ 56 | public double getPI(String nodeName) { 57 | Long nodeCount = totalTermsFreqMap.get(nodeName); 58 | if (nodeCount == null) { 59 | return 0; 60 | } 61 | 62 | double pi = - Math.log(((double)nodeCount) / totalTermsPopulation); 63 | return pi; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /SimilarityUtils/src/gov/nist/msi/ssmpi/similarity/utils/WordStringUtils.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.utils; 2 | 3 | public class WordStringUtils { 4 | public static String generateMultiWordString(String s) { 5 | StringBuffer result = new StringBuffer(); 6 | for (int i = 0; i < s.length(); i++) { 7 | if ( s.charAt(i) >= 'A' && s.charAt(i) <= 'Z') { 8 | result.append(" " + s.charAt(i)); 9 | i++; 10 | if (i < s.length()) { 11 | result.append(s.charAt(i)); 12 | } 13 | } else { 14 | result.append(s.charAt(i)); 15 | } 16 | } 17 | 18 | String resultStr = result.toString(); 19 | 20 | return resultStr.trim(); 21 | } 22 | 23 | 24 | public static String removeStopwords(String t) { 25 | 26 | t = t.replaceAll("[();\"'.,]?", ""); 27 | 28 | // extracted from http://www.ranks.nl/tools/stopwords.html 29 | t = t.replaceAll(" a ", " ") 30 | .replaceAll(" the ", " ") 31 | .replaceAll(" and ", " ") 32 | .replaceAll(" or ", " ") 33 | .replaceAll(" in ", " ") 34 | .replaceAll(" of ", " ") 35 | .replaceAll(" to ", " ") 36 | .replaceAll(" that ", " ") 37 | .replaceAll(" it ", " ") 38 | .replaceAll(" i ", " ") 39 | .replaceAll(" you ", " ") 40 | .replaceAll(" about ", " ") 41 | .replaceAll(" an ", " ") 42 | .replaceAll(" are ", " ") 43 | .replaceAll(" as ", " ") 44 | .replaceAll(" at ", " ") 45 | .replaceAll(" be ", " ") 46 | .replaceAll(" by ", " ") 47 | .replaceAll(" for ", " ") 48 | .replaceAll(" from ", " ") 49 | .replaceAll(" how ", " ") 50 | .replaceAll(" is ", " ") 51 | .replaceAll(" on ", " ") 52 | .replaceAll(" this ", " ") 53 | .replaceAll(" was ", " ") 54 | .replaceAll(" what ", " ") 55 | .replaceAll(" when ", " ") 56 | .replaceAll(" where ", " ") 57 | .replaceAll(" who ", " ") 58 | .replaceAll(" will ", " ") 59 | .replaceAll(" into ", " ") 60 | .replaceAll(" which ", " ") 61 | .replaceAll(" with ", " "); 62 | return t; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /SimilarityUtils/test/domain_independent.txt: -------------------------------------------------------------------------------- 1 | #These are semantic class labels which we may want to use 2 | #in any domain (the senses are for WordNet 2) 3 | namperson person#n#1 4 | namcompany organisation#n#3 5 | namorganisation organisation#n#3 6 | nampost post#n#3 7 | namlocation geographic_area#n#1 8 | nammoney money#n#1 9 | namdate day#n#2 10 | 11 | #These are domain dependent tags which could actually appear 12 | #in any documents and don't change depending on the domain of the 13 | #document being considered 14 | namprotein protein#n#1 -------------------------------------------------------------------------------- /SimilarityUtils/test/gov/nist/msi/ssmpi/similarity/impl/SSTop_CosineTest.java: -------------------------------------------------------------------------------- 1 | package gov.nist.msi.ssmpi.similarity.impl; 2 | 3 | import gov.nist.msi.ssmpi.similarity.StringSimilarity; 4 | 5 | public class SSTop_CosineTest { 6 | 7 | static String s = "stay"; 8 | static String t = "arrest"; 9 | //arrest, check, halt, hitch, stay, stop, stoppage 10 | 11 | public static void testGetSimilarity1() { 12 | StringSimilarity sim = new SSTop_Cosine(); 13 | float r = sim.getSimilarity(s, t); 14 | System.out.println(r); 15 | } 16 | 17 | public static void testGetSimilarity2() { 18 | StringSimilarity sim = new SSTop_Jaccard(); 19 | float r = sim.getSimilarity(s, t); 20 | System.out.println(r); 21 | } 22 | 23 | public static void testGetSimilarity3() { 24 | StringSimilarity sim = new SSTop_ICofWN(); 25 | float r = sim.getSimilarity(s, t); 26 | System.out.println(r); 27 | } 28 | 29 | public static void testGetSimilarity4() { 30 | StringSimilarity sim = new SSTop_WN_Cosine(); 31 | float r = sim.getSimilarity(s, t); 32 | System.out.println(r); 33 | } 34 | 35 | public static void testGetSimilarity5() { 36 | String[] informationList = { "Car", "Automobile", "Car", "Information", 37 | "Data", "Car", "Automobile", "File" }; 38 | StringSimilarity sim = new SSTop_WN_IC_Cosine(informationList); 39 | float r = sim.getSimilarity(s, t); 40 | System.out.println(r); 41 | } 42 | 43 | public static void testGetSimilarity6() { 44 | StringSimilarity sim = new SSTop_WN_Jaccard(); 45 | float r = sim.getSimilarity(s, t); 46 | System.out.println(r); 47 | } 48 | 49 | public static void main(String[] args) { 50 | //testGetSimilarity4(); 51 | s = "eat"; 52 | t = "sleep"; 53 | testGetSimilarity6(); 54 | 55 | s = "stay"; 56 | t = "halt"; 57 | testGetSimilarity6(); 58 | 59 | s = "stay"; 60 | t = "check"; 61 | testGetSimilarity6(); 62 | 63 | s = "stay"; 64 | t = "stop"; 65 | testGetSimilarity6(); 66 | 67 | s = "stay"; 68 | t = "hitch"; 69 | testGetSimilarity6(); 70 | 71 | s = "stay"; 72 | t = "stoppage"; 73 | testGetSimilarity6(); 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /SimilarityUtils/test/wordnet.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /SolrCommons/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SolrCommons/.DS_Store -------------------------------------------------------------------------------- /SolrCommons/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SolrCommons/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SolrCommons 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /SolrCommons/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.7 12 | -------------------------------------------------------------------------------- /SolrCommons/bin/.gitignore: -------------------------------------------------------------------------------- 1 | /com/ 2 | /nf/ 3 | -------------------------------------------------------------------------------- /SolrCommons/bin/com/solr/opennlp/util/OpenNLPUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SolrCommons/bin/com/solr/opennlp/util/OpenNLPUtil.class -------------------------------------------------------------------------------- /SolrCommons/bin/nf/solr/test/TamingTextTestJ4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/john77eipe/DeepQA/909286aadb6fde9c5e78d31a9467ab60e4aeaa32/SolrCommons/bin/nf/solr/test/TamingTextTestJ4.class -------------------------------------------------------------------------------- /SolrCommons/src/com/solr/opennlp/util/OpenNLPUtil.java: -------------------------------------------------------------------------------- 1 | package com.solr.opennlp.util; 2 | 3 | import java.io.File; 4 | import java.util.Map; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | public class OpenNLPUtil { 10 | static { 11 | System.setProperty("model.dir", 12 | "C:\\Users\\Atechian\\Desktop\\WProto\\opennlp-models"); 13 | System.setProperty("wordnet.dir", 14 | "C:\\Users\\Atechian\\Desktop\\WProto\\WordNet-3.0"); 15 | } 16 | 17 | private static final Logger log = LoggerFactory 18 | .getLogger(OpenNLPUtil.class); 19 | private static final String DEFAULT_MODEL_LANGUAGE = "en"; 20 | 21 | public static String getModelDirectory(Map args) { 22 | String modelDirectory = null; 23 | 24 | if (args != null) { 25 | modelDirectory = args.get("modelDirectory"); 26 | } 27 | 28 | if (modelDirectory == null || modelDirectory.equals("")) { 29 | modelDirectory = System.getProperty("model.dir"); 30 | } 31 | 32 | if (modelDirectory == null || modelDirectory.equals("")) { 33 | throw new RuntimeException( 34 | "Configuration Error: modelDirectory argument " 35 | + "or model.dir system property not set: " 36 | + modelDirectory); 37 | } else { 38 | log.info("Model directory is: {}", modelDirectory); 39 | } 40 | 41 | return modelDirectory; 42 | } 43 | 44 | public static String getModelLanguage(Map args) { 45 | String modelLanguage = null; 46 | 47 | if (args != null) { 48 | args.get("modelLanguage"); 49 | } 50 | 51 | if (modelLanguage == null || modelLanguage.equals("")) { 52 | modelLanguage = System.getProperty("model.language"); 53 | } 54 | 55 | if (modelLanguage == null || modelLanguage.equals("")) { 56 | log.warn("modelLanguage argument or model.language property not set, " 57 | + "using default: " + DEFAULT_MODEL_LANGUAGE); 58 | modelLanguage = DEFAULT_MODEL_LANGUAGE; 59 | } 60 | 61 | return modelLanguage; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /SolrCommons/src/nf/solr/test/TamingTextTestJ4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008-2011 Grant Ingersoll, Thomas Morton and Drew Farris 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * ------------------- 16 | * To purchase or learn more about Taming Text, by Grant Ingersoll, Thomas Morton and Drew Farris, visit 17 | * http://www.manning.com/ingersoll 18 | */ 19 | 20 | package nf.solr.test; 21 | 22 | 23 | import junit.framework.Assert; 24 | import org.junit.BeforeClass; 25 | 26 | import java.io.File; 27 | 28 | /** 29 | * 30 | * 31 | **/ 32 | public class TamingTextTestJ4 extends Assert { 33 | @BeforeClass 34 | public static void setUp() { 35 | 36 | 37 | } 38 | static { 39 | System.setProperty("model.dir", "/Users/914957/Documents/DeepQA/DeepQASupport/opennlp_models"); 40 | System.setProperty("wordnet.dir", "/Users/914957/Documents/DeepQA/DeepQASupport/WordNet-3.0"); 41 | } 42 | public static File getWordNetDir(){ 43 | String wordnetDir = System.getProperty("wordnet.dir"); 44 | 45 | return new File(wordnetDir); 46 | } 47 | 48 | public static File getWordNetDictionary(){ 49 | return new File(getWordNetDir(), "dict"); 50 | } 51 | 52 | public static File getModelDir(){ 53 | String modelsDirProp = System.getProperty("model.dir"); 54 | 55 | return new File(modelsDirProp); 56 | } 57 | 58 | public static File getEnglishDir(){ 59 | return new File(getModelDir(), "english"); 60 | } 61 | 62 | public static File getNameFindDir(){ 63 | return new File(getModelDir(), "namefind"); 64 | } 65 | 66 | public static File getSentDetectDir(){ 67 | return new File(getModelDir(), "sentdetect"); 68 | } 69 | 70 | public static File getChunkerDir(){ 71 | return new File(getModelDir(), "chunker"); 72 | } 73 | 74 | public static File getParserDir(){ 75 | return new File(getModelDir(), "parser"); 76 | } 77 | 78 | public static File getPOSDir(){ 79 | return new File(getModelDir(), "postag"); 80 | } 81 | 82 | public static File getPersonModel(){ 83 | return new File(getModelDir(), "en-ner-person.bin"); 84 | } 85 | 86 | 87 | } 88 | --------------------------------------------------------------------------------