Skip to content

Output format: training-output to build supervised models#801

Open
enoriega wants to merge 55 commits into
masterfrom
enoriega/training_output
Open

Output format: training-output to build supervised models#801
enoriega wants to merge 55 commits into
masterfrom
enoriega/training_output

Conversation

@enoriega

@enoriega enoriega commented Sep 6, 2023

Copy link
Copy Markdown
Member

Summary

Added a new output format suitable to train classifiers using a python pipeline. It "flattens" activations and regulations and creates a json array with the tokens, spans, label and polarity for each event.

Example

[
  {
    "sentence_tokens" : [ "Notably", ",", "overexpressing", "MafB", "in", "human", "beta-cell", "lines", "(", "beta", "TC3", "cells", ")", "resulted", "in", "increased", "cell", "proliferation", "by", "upregulating", "important", "cell", "cycle", "regulators", ",", "like", "cyclin", "D2", "and", "cyclin", "B", "(", "28", ")", "." ],
    "event_indices" : [ 16, 17, 18, 19, 20, 21, 22, 23 ],
    "type" : "Positive_activation",
    "polarity" : true,
    "controller_indices" : [ 16, 17, 18 ],
    "controlled_indices" : [ 21, 22, 23 ],
    "trigger_indices" : [ 19, 20 ]
  }, {
    "sentence_tokens" : [ "In", "vivo", "glucose", "stimulated", "insulin", "secretion", "(", "GSIS", ")", "experiment", ".." ],
    "event_indices" : [ 2, 3, 4, 5, 6 ],
    "type" : "Positive_activation",
    "polarity" : true,
    "controller_indices" : [ 2, 3 ],
    "controlled_indices" : [ 4, 5, 6 ],
    "trigger_indices" : [ 3, 4 ]
  }
]

# Conflicts:
#	bioresources/src/main/resources/org/clulab/reach/kb/NER-Grounding-Override.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/BioProcess.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/CellLine.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/CellType.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Cellular_component.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Disease.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Family.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Gene_or_gene_product.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Organ.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Simple_chemical.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Site.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/Species.tsv.gz
#	bioresources/src/main/resources/org/clulab/reach/kb/ner/TissueType.tsv.gz
…statistics events. Added support for significance and confidence intervals to the arizona output (and possibly to the CMU by extension)
@enoriega
enoriega requested a review from kwalcock September 6, 2023 21:07

@kwalcock kwalcock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crossScalaVersion does need to be changed for publication.

Comment thread build.sbt Outdated
Comment thread export/src/main/scala/org/clulab/reach/export/TrainingDataExporter.scala Outdated
Comment thread export/src/main/scala/org/clulab/reach/export/TrainingDataExporter.scala Outdated
@kwalcock

Copy link
Copy Markdown
Member

@enoriega, this is being built for both Scala 2.11 and 2.12. The earlier version does not like trailing/dangling commas like the ones in TrainingDataExporter, so it doesn't compile. One can use ++compile or ++2.11.12 and then compile to test.

@enoriega
enoriega requested a review from kwalcock September 22, 2023 22:31
@kwalcock

Copy link
Copy Markdown
Member

That TrainingDataExporter still needs a comma removed at line 76 in order to work on Scala 2.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants