Skip to main content
# NCGOCR

[![](https://img.shields.io/travis/jeroyang/ncgocr.svg)](https://travis-ci.org/jeroyang/ncgocr)
[![](https://img.shields.io/pypi/v/ncgocr.svg)](https://pypi.python.org/pypi/ncgocr)


- Named Concept Gene Ontology Concept Recognition
- Automatic recognize Gene Ontology (GO) concepts from context.

## Installation

Using 'pip' to install the Python module
```bash
$ pip install -U ncgocr
```

## Usage
```python
from ncgocr import Craft, GoData, NCGOCR, Corpus, evaluate

craft = Craft('data')
corpus = craft.get_corpus()
goldstandard = craft.get_goldstandard()

print('Loading GO...')
godata = GoData('data/craft-1.0/ontologies/GO.obo')

print('Initiating NCGOCR...')
ncgocr = NCGOCR(godata)

print('Training the model...')
ncgocr.train(corpus, goldstandard)

print('Loading the testing corpus...')
corpus_name = 'testing corpus'
testing_corpus = Corpus.from_dir('data/craft-1.0/articles/txt/', corpus_name)

print('predicting the results...')
result = ncgocr.process(testing_corpus)

print('Show the first 10 results...')
print(result.to_list()[:10])

print('Evaluate the results...')
report = evaluate(result, goldstandard, 'Using the training corpus as the testing corpus')
print(report)
```


## License
* Free software: MIT license

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncgocr-1.0.2.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncgocr-1.0.2-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file ncgocr-1.0.2.tar.gz.

File metadata

  • Download URL: ncgocr-1.0.2.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ncgocr-1.0.2.tar.gz
Algorithm Hash digest
SHA256 29b4ab29474d07c1779c56bf51b1cc553b9e7bc9db06740fd12106b28af432b0
MD5 f59fcfca3ceca469c9db9b70274402e8
BLAKE2b-256 25bdd78c8f72bd65acba797906c802224404f53adf3f26afc3d6a99cf5ba9ef0

See more details on using hashes here.

File details

Details for the file ncgocr-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ncgocr-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ed959b747be4fbf3281c4984e5d40ad65b9ee22aa551468591bbafb870c042
MD5 effe7da0da5a16197618eca6ced62497
BLAKE2b-256 fe371d063d20311e213f55bffe093656f6bf8ad70712e0deaa5f2d60e927806b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page