Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed folder structure for ontologies, review based changes #4

Merged
merged 5 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
225 changes: 225 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# Created by https://www.gitignore.io/api/python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site


### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*


### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags


### Emacs ###
# -*- mode: gitignore; -*-
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile

# directory configuration
.dir-locals.el

# Editors
.idea
.vscode

docs/_build
.generated

### IntelliJ ###
*.iml

### pytest ###
.pytest_cache/

### mypy ###
.mypy_cache/

### Project ###
en_ewt_models/
fr_gsd_models/
Binary file removed examples/mimic_iii/.DS_Store
Binary file not shown.
Binary file not shown.
Empty file removed examples/mimic_iii/demo/.generated
Empty file.
Binary file not shown.
Binary file not shown.
49 changes: 0 additions & 49 deletions examples/mimic_iii/demo/clinical.py

This file was deleted.

2 changes: 1 addition & 1 deletion examples/mimic_iii/medical_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from forte.data.readers import StringReader
from forte.pipeline import Pipeline
from forte.processors.writers import PackIdJsonPackWriter
from ftx.medical import MedicalEntityMention
from ftx.medical.clinical import MedicalEntityMention

from ft.onto.base_ontology import (
Token,
Expand Down
12 changes: 6 additions & 6 deletions forte_medical/ontology_specs/clinical_onto.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "clinical",
"additional_prefixes": [
"demo.clinical"
],
"imports": [
"base_ontology.json"
],
"additional_prefixes": [
"ftx.medical"
],
"definitions": [
{
"entry_name": "demo.clinical.ClinicalEntityMention",
"entry_name": "ftx.medical.clinical.ClinicalEntityMention",
"parent_entry": "ft.onto.base_ontology.EntityMention",
"description": "A span based annotation `ClinicalEntityMention`, normally used to represent an Entity Mention in a piece of clinical text."
},
{
"entry_name": "demo.clinical.Description",
"entry_name": "ftx.medical.clinical.Description",
"parent_entry": "forte.data.ontology.top.Annotation",
"description": "A span based annotation `Description`, used to represent the description in a piece of clinical note."
},
{
"entry_name": "demo.clinical.Body",
"entry_name": "ftx.medical.clinical.Body",
"parent_entry": "forte.data.ontology.top.Annotation",
"description": "A span based annotation `Body`, used to represent the actual content in a piece of clinical note."
}
Expand Down
Empty file.
1 change: 0 additions & 1 deletion forte_medical/ontology_specs/demo/__init__.py

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion forte_medical/readers/mimic3_note_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from forte.data.data_pack import DataPack
from forte.data.base_reader import PackReader
from forte_medical.ontology_specs.demo.clinical import Description, Body
from ftx.medical.clinical import Description, Body


class Mimic3DischargeNoteReader(PackReader):
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
long_description=long_description,
long_description_content_type="text/markdown",
license='',
packages=setuptools.find_packages(
packages=setuptools.find_namespace_packages(
include=['ftx.*'],
exclude=["scripts*", "examples*", "tests*"]
),
install_requires=[
Expand Down