Changes between Initial Version and Version 1 of DespoinaLog/2010/09/05


Ignore:
Timestamp:
2010-10-01T23:19:13+02:00 (14 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DespoinaLog/2010/09/05

    v1 v1  
     1Dasha documentation
     2
     3=== How to configure and run query expansion in molgenis4phenotype ===
     41)    download the ontologies from http://bioportal.bioontology.org/
     5
     6You should download
     7
     8 * (!http://rest.bioontology.org/bioportal/ontologies/download/44307?applicationid=4ea81d74-8960-4525-810b-fa1baab576ff)
     9
     10 * Human Disease (!http://rest.bioontology.org/bioportal/ontologies/download/44309?applicationid=4ea81d74-8960-4525-810b-fa1baab576ff)
     11
     12 * NCI Thesaurus (!http://rest.bioontology.org/bioportal/ontologies/download/42838?applicationid=4ea81d74-8960-4525-810b-fa1baab576ff)
     13
     14MeSH can be taken from biobank_search\!WebContent\WEB-INF
     15
     162)    Change  the directory names:
     17
     18 * in DBIndexPlugin: LUCENE_INDEX_DIRECTORY
     19
     20 * in !OntoCatIndexPlugin2: LUCENE_ONTOINDEX_DIRECTORY, ''ONTOLOGIES_DIRECTORY''
     21
     223)    Create a Molgenis database
     23
     244)    Set the VM arguments for !OntoCatIndexPlugin2.java to –Xms1024M –Xmx1024M
     25
     265)    Run the project
     27
     286)    Upload the data into the database
     29
     307)    In ''DB Index and Search'' press ''Build Index'' to build the index of your database
     31
     328)    In ''Index OntoCAT'' '' ''press ''Build Ontocat Index''
     33
     349)    Now in ''DB Index and Search'' you can search your database by pressing ''Search Index'' or search your database with query expansion by choosing appropriate ontologies and pressing ''Search with query expansion''
     35
     36=== Project Description ===
     37'''public class DBIndexPlugin'''
     38
     39the plugin to index and search the database (with or without query expansion):
     40
     41@param LUCENE_INDEX_DIRECTORY – empty directory to put index files in
     42
     43'''public void buildIndexAllTables(Database db)''' –makes the index
     44
     45'''public void SearchAllDBTablesIndex(Database db)''' –searches the index (in “description” field)
     46
     47'''public void !ExpandQuery(Database db)''' –expands the query by calling expand(!OntologiesForExpansion)from !OntocatQueryExpansion_lucene
     48
     49'''public class !OntocatQueryExpansion_lucene'''
     50
     51'''public List<String> parseQuery(String query)''' –parses the query by ignoring the punctuation, splitting the query by ‘ ‘, Boolean operators, reading phrases in quotation marks as a single unit. Calls public List<String> chunk (List<String> words)
     52
     53'''public List<String> chunk (List<String> words) '''– chunks the query (List<String> words) into all possible n-grams (combinations of subsequent query words) (n ranges from 1 to words.size())
     54
     55'''public void expand(List<String> ontologiesToUse) '''– finds expansion terms in ontologiesToUse. For every n-gram of the chunked query searches it in ontologies, if found, adds expansion terms to initial query list
     56
     57'''public String output(List<String> parsed) '''– constructs a new query of the initial query list, adding expansion terms with lower weight, using the same Boolean operators and quotes (if any) as in user query.
     58
     59'''public class !OntoCatIndexPlugin2'''
     60
     61the plugin that indexes and searches the ontologies
     62
     63@param LUCENE_ONTOINDEX_DIRECTORY - empty directory to put index files in
     64
     65@param ''ONTOLOGIES_DIRECTORY ''– the directory, where the ontologies are stored
     66
     67@param ''ontologyNamesMap ''– the list of ontologies and the correspondence between ontology names and file names containing them
     68
     69'''public String !SearchIndexOntocat(String query, List<String> ontologyLabels) '''– searches the query in the ontologies with names ontologyLabels. Returns a string “!term:expansion term1; expansion term2;… expansion termN;”
     70
     71'''public void buildIndexOntocat() '''-  builds the ontology index. Pairs (!term:expansion) are stored for each term of each ontology
     72
     73  '''  '''