vsoch / theMethodsOntology

0 stars 0 forks source link

TheMethodsOntology

Python module and scripts for parsing the ontology (owl file) and searching pubmed articles for methods. under development

MethodsOntology.py

Owl

Pubmed

Example usage

Use theMethodsOntology module to parse pubmed xml

import MethodsOntology as MO

Test xml file

owl = "root-ontology.owl"
article = "pone.0046493.nxml"

Read in ontology

ontology = MO.Owl(owl)

Create Pubmed parser for article

parser = MO.Pubmed(ontology)

Text is also stored in parser object

text = parser.getXMLText(article)

Now find sentences with methods

matches = parser.extractMethods()