Description Usage Arguments Value Examples
This is the primary function for processing both data frames and character
vectors in the clinspacy
package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | clinspacy(
x,
df_col = NULL,
df_id = NULL,
threshold = 0.99,
semantic_types = c(NA, "Acquired Abnormality", "Activity", "Age Group",
"Amino Acid Sequence", "Amino Acid, Peptide, or Protein", "Amphibian",
"Anatomical Abnormality", "Anatomical Structure", "Animal", "Antibiotic", "Archaeon",
"Bacterium", "Behavior", "Biologic Function", "Biologically Active Substance",
"Biomedical Occupation or Discipline", "Biomedical or Dental Material", "Bird",
"Body Location or Region", "Body Part, Organ, or Organ Component",
"Body Space or Junction", "Body Substance", "Body System", "Carbohydrate Sequence",
"Cell", "Cell Component", "Cell Function", "Cell or Molecular Dysfunction",
"Chemical", "Chemical Viewed Functionally", "Chemical Viewed Structurally",
"Classification", "Clinical Attribute", "Clinical Drug", "Conceptual Entity",
"Congenital Abnormality", "Daily or Recreational Activity", "Diagnostic Procedure",
"Disease or Syndrome", "Drug Delivery Device", "Educational Activity",
"Element, Ion, or Isotope", "Embryonic Structure", "Entity",
"Environmental Effect of Humans", "Enzyme", "Eukaryote", "Event",
"Experimental Model of Disease", "Family Group", "Finding", "Fish", "Food",
"Fully Formed Anatomical Structure", "Functional Concept", "Fungus",
"Gene or Genome", "Genetic Function", "Geographic Area",
"Governmental or Regulatory Activity", "Group", "Group Attribute",
"Hazardous or Poisonous Substance", "Health Care Activity",
"Health Care Related Organization", "Hormone", "Human",
"Human-caused Phenomenon or Process", "Idea or Concept", "Immunologic Factor",
"Indicator, Reagent, or Diagnostic Aid", "Individual Behavior",
"Injury or Poisoning", "Inorganic Chemical", "Intellectual Product",
"Laboratory or Test Result", "Laboratory Procedure", "Language", "Machine Activity",
"Mammal", "Manufactured Object", "Medical Device",
"Mental or Behavioral Dysfunction", "Mental Process",
"Molecular Biology Research Technique", "Molecular Function", "Molecular Sequence",
"Natural Phenomenon or Process", "Neoplastic Process",
"Nucleic Acid, Nucleoside, or Nucleotide", "Nucleotide Sequence",
"Occupation or Discipline", "Occupational Activity", "Organ or Tissue Function",
"Organic Chemical", "Organism", "Organism Attribute", "Organism Function",
"Organization", "Pathologic Function", "Patient or Disabled Group",
"Pharmacologic Substance", "Phenomenon or Process", "Physical Object",
"Physiologic Function", "Plant", "Population Group",
"Professional or Occupational Group", "Professional Society", "Qualitative Concept",
"Quantitative Concept", "Receptor", "Regulation or Law", "Reptile",
"Research Activity", "Research Device", "Self-help or Relief Organization",
"Sign or Symptom", "Social Behavior", "Spatial Concept", "Substance",
"Temporal Concept", "Therapeutic or Preventive Procedure", "Tissue", "Vertebrate",
"Virus", "Vitamin"),
return_scispacy_embeddings = FALSE,
verbose = TRUE,
output_file = NULL,
overwrite = FALSE
)
|
x |
Either a data.frame or a character vector |
df_col |
If |
df_id |
If |
threshold |
Defaults to 0.99. The confidence threshold value used by
clinspacy (can be higher than the |
semantic_types |
Character vector containing any combination of the following: c(NA, "Acquired Abnormality", "Activity", "Age Group", "Amino Acid Sequence", "Amino Acid, Peptide, or Protein", "Amphibian", "Anatomical Abnormality", "Anatomical Structure", "Animal", "Antibiotic", "Archaeon", "Bacterium", "Behavior", "Biologic Function", "Biologically Active Substance", "Biomedical Occupation or Discipline", "Biomedical or Dental Material", "Bird", "Body Location or Region", "Body Part, Organ, or Organ Component", "Body Space or Junction", "Body Substance", "Body System", "Carbohydrate Sequence", "Cell", "Cell Component", "Cell Function", "Cell or Molecular Dysfunction", "Chemical", "Chemical Viewed Functionally", "Chemical Viewed Structurally", "Classification", "Clinical Attribute", "Clinical Drug", "Conceptual Entity", "Congenital Abnormality", "Daily or Recreational Activity", "Diagnostic Procedure", "Disease or Syndrome", "Drug Delivery Device", "Educational Activity", "Element, Ion, or Isotope", "Embryonic Structure", "Entity", "Environmental Effect of Humans", "Enzyme", "Eukaryote", "Event", "Experimental Model of Disease", "Family Group", "Finding", "Fish", "Food", "Fully Formed Anatomical Structure", "Functional Concept", "Fungus", "Gene or Genome", "Genetic Function", "Geographic Area", "Governmental or Regulatory Activity", "Group", "Group Attribute", "Hazardous or Poisonous Substance", "Health Care Activity", "Health Care Related Organization", "Hormone", "Human", "Human-caused Phenomenon or Process", "Idea or Concept", "Immunologic Factor", "Indicator, Reagent, or Diagnostic Aid", "Individual Behavior", "Injury or Poisoning", "Inorganic Chemical", "Intellectual Product", "Laboratory or Test Result", "Laboratory Procedure", "Language", "Machine Activity", "Mammal", "Manufactured Object", "Medical Device", "Mental or Behavioral Dysfunction", "Mental Process", "Molecular Biology Research Technique", "Molecular Function", "Molecular Sequence", "Natural Phenomenon or Process", "Neoplastic Process", "Nucleic Acid, Nucleoside, or Nucleotide", "Nucleotide Sequence", "Occupation or Discipline", "Occupational Activity", "Organ or Tissue Function", "Organic Chemical", "Organism", "Organism Attribute", "Organism Function", "Organization", "Pathologic Function", "Patient or Disabled Group", "Pharmacologic Substance", "Phenomenon or Process", "Physical Object", "Physiologic Function", "Plant", "Population Group", "Professional or Occupational Group", "Professional Society", "Qualitative Concept", "Quantitative Concept", "Receptor", "Regulation or Law", "Reptile", "Research Activity", "Research Device", "Self-help or Relief Organization", "Sign or Symptom", "Social Behavior", "Spatial Concept", "Substance", "Temporal Concept", "Therapeutic or Preventive Procedure", "Tissue", "Vertebrate", "Virus", "Vitamin") |
return_scispacy_embeddings |
Defaults to |
verbose |
Defaults to |
output_file |
Defaults to |
overwrite |
Defaults to |
If output_file
is NULL
(the default), then this
function returns a data frame containing the UMLS concept unique
identifiers (cui), entities, lemmatized entities, CyContext negation status
(TRUE
means negated, FALSE
means *not* negated), other
CyContext contexts, and section title from the clinical sectionizer. If
output_file
points to a file name, then the name of the created file
will be returned.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
clinspacy('This patient has diabetes and CKD stage 3 but no HTN.')
clinspacy(c('This pt has CKD and HTN', 'Pt only has CKD but no HTN'))
data.frame(text = c('This pt has CKD and HTN', 'Diabetes is present'),
stringsAsFactors = FALSE) %>%
clinspacy(df_col = 'text')
if (!dir.exists(rappdirs::user_data_dir('clinspacy'))) {
dir.create(rappdirs::user_data_dir('clinspacy'), recursive = TRUE)
}
clinspacy(c('This pt has CKD and HTN', 'Has CKD but no HTN'),
output_file = file.path(rappdirs::user_data_dir('clinspacy'),
'output.csv'),
overwrite = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.