Difference between revisions of "RadLex Protege Plugin"
Johnpaulett (talk | contribs) (Initial load) |
Johnpaulett (talk | contribs) |
||
Line 3: | Line 3: | ||
=== Tabbed File Importer === | === Tabbed File Importer === | ||
− | + | Imports the parent/child relationships based upon a tabbed file. The RadLex Committees have created Microsoft Word files that contain the basic structure and definition of terms. Each file is constructed so that an indent past the current indentation level indicates a child of the higher term. Terms on the same level are considered to be siblings. Additional codes are put at the beginning of the lines to indicate the type of relationship. Synonyms, definitions, and comments are added to the end of the line, following special codes. | |
+ | |||
+ | ==== Sample Tabbed File ==== | ||
+ | The following is a small portion of the thorax file. | ||
+ | <pre> | ||
+ | ISA: thorax; chest [COM: child of anatomic location] | ||
+ | CON: airway | ||
+ | P: tracheobronchial tree | ||
+ | trachea | ||
+ | carina | ||
+ | BR: bronchus | ||
+ | right main bronchus | ||
+ | right upper lobe bronchus | ||
+ | </pre> | ||
+ | |||
+ | ==== Format of Tabbed Files ==== | ||
+ | MSWord files must be indented using true tab characters, not margin changes. This can be | ||
+ | accomplished in MSWord under Tools > AutoCorrect Options... > Auto Format As You Type, and uncheck | ||
+ | the box labeled "Set left- and first-indent with tabs and backspaces" (2nd from bottom). | ||
+ | |||
+ | The relation between parent and child terms can be switched using by placing the code for each | ||
+ | relation at the beginning of the line, followed by ":". The relation persists until changed by | ||
+ | another code. The codes are listed in the comment [COM:] fields of the attached file | ||
+ | "RadLexRelations.doc". It is relatively easy to add new relations if needed. | ||
+ | |||
+ | Protégé slots for each term can be specified using information in square brackets following a term | ||
+ | on the same line. A code within the square brackets signifies the slot to be filled. For example: | ||
+ | [COM: This is a comment.] [DEF: This is a definition.]. It is easy to create new codes to signify | ||
+ | new term attributes. | ||
+ | |||
+ | Synonyms are listed on the same line, separated by semicolons. The first term on the line is the | ||
+ | primary term. | ||
+ | |||
+ | ==== Codes ==== | ||
+ | <table border="1"> | ||
+ | <tr> | ||
+ | <th>Code</th> | ||
+ | <th>Relationship</th> | ||
+ | <th>Comment</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>ISA</td> | ||
+ | <td>Is a</td> | ||
+ | <td>Type of</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>P</td> | ||
+ | <td>Part of</td> | ||
+ | <td></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>BR</td> | ||
+ | <td>Branch of</td> | ||
+ | <td>vessel, nerve</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>SEG</td> | ||
+ | <td>Segment of</td> | ||
+ | <td></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>TRIB</td> | ||
+ | <td>Tributary of</td> | ||
+ | <td>Vein, nerve plexus, arterial confluence</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>CON</td> | ||
+ | <td>Continuous with</td> | ||
+ | <td></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>C</td> | ||
+ | <td>Contained in</td> | ||
+ | <td></td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>MEM</td> | ||
+ | <td>Member of</td> | ||
+ | <td></td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | <table border="1"> | ||
+ | <tr> | ||
+ | <th>Code</th> | ||
+ | <th>Field</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>DEF</td> | ||
+ | <td>Definition</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>COM</td> | ||
+ | <td>Comment</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | ==== How to Import a Tabbed File ==== | ||
+ | First, make sure that the RadLex Import tab is visible in Protege. If not, add it by going to the Project > Configure menu and checking the "RadlexImportTab". | ||
+ | |||
+ | Now go to the "Radlex Import Tool" tab. On the left, click the term under which the file should be added. The click the "import File..." button and select the file that you wish to import (NOTE: the file must be a plain text file, Word files and RTF files are not acceptable). | ||
+ | |||
+ | The importer will check to make sure that there are no terms with the same name. If all term names are | ||
+ | unique, it will generate a unique RadLex ID and add the terms to the ontology. | ||
=== RadLex SQL Exporter === | === RadLex SQL Exporter === |
Revision as of 22:05, 4 March 2007
1 Plugin Description
The plugins have been tested on version 3.2 of Protege. If the plugins do not work on a newer version, it is recommended that the plugin is rebuilt from source, using the most recent build of the Protege libraries.
1.1 Tabbed File Importer
Imports the parent/child relationships based upon a tabbed file. The RadLex Committees have created Microsoft Word files that contain the basic structure and definition of terms. Each file is constructed so that an indent past the current indentation level indicates a child of the higher term. Terms on the same level are considered to be siblings. Additional codes are put at the beginning of the lines to indicate the type of relationship. Synonyms, definitions, and comments are added to the end of the line, following special codes.
1.1.1 Sample Tabbed File
The following is a small portion of the thorax file.
ISA: thorax; chest [COM: child of anatomic location] CON: airway P: tracheobronchial tree trachea carina BR: bronchus right main bronchus right upper lobe bronchus
1.1.2 Format of Tabbed Files
MSWord files must be indented using true tab characters, not margin changes. This can be accomplished in MSWord under Tools > AutoCorrect Options... > Auto Format As You Type, and uncheck the box labeled "Set left- and first-indent with tabs and backspaces" (2nd from bottom).
The relation between parent and child terms can be switched using by placing the code for each relation at the beginning of the line, followed by ":". The relation persists until changed by another code. The codes are listed in the comment [COM:] fields of the attached file "RadLexRelations.doc". It is relatively easy to add new relations if needed.
Protégé slots for each term can be specified using information in square brackets following a term on the same line. A code within the square brackets signifies the slot to be filled. For example: [COM: This is a comment.] [DEF: This is a definition.]. It is easy to create new codes to signify new term attributes.
Synonyms are listed on the same line, separated by semicolons. The first term on the line is the primary term.
1.1.3 Codes
Code | Relationship | Comment |
---|---|---|
ISA | Is a | Type of |
P | Part of | |
BR | Branch of | vessel, nerve |
SEG | Segment of | |
TRIB | Tributary of | Vein, nerve plexus, arterial confluence |
CON | Continuous with | |
C | Contained in | |
MEM | Member of |
Code | Field |
---|---|
DEF | Definition |
COM | Comment |
1.1.4 How to Import a Tabbed File
First, make sure that the RadLex Import tab is visible in Protege. If not, add it by going to the Project > Configure menu and checking the "RadlexImportTab".
Now go to the "Radlex Import Tool" tab. On the left, click the term under which the file should be added. The click the "import File..." button and select the file that you wish to import (NOTE: the file must be a plain text file, Word files and RTF files are not acceptable).
The importer will check to make sure that there are no terms with the same name. If all term names are unique, it will generate a unique RadLex ID and add the terms to the ontology.
1.2 RadLex SQL Exporter
Generates a file for creating the database for the RadLex Term Browser
1.2.1 Database Structure
The Term Browser uses two tables: radterms Defines the relevant information about each term
radlinks Defines the relationships between terms
1.3 RadLex OWL Exporter
converts the Protege Frames ontology into a OWL ontology
1.4 RID Generator
generates unique RadLex ID for new terms
2 Installation Instructions
Download and install Protege.
Download a copy of the plugin.
Unzip the plugin into the plugins directory of your Protege installation. On windows, this directory usually is (depending on your version of Protege):
C:\Program Files\Protege_3.2.1\plugins
Once unzipped, the file plugin will be located at
C:\Program Files\Protege_3.2.1\plugins\org.radlex\radlex_plugins.jar