From 733b664109f1448dac1999fc6542c57ef8f218d0 Mon Sep 17 00:00:00 2001 From: Ruairidh MacLeod Date: Thu, 15 Feb 2024 10:19:09 +0000 Subject: [PATCH] fixup spelling --- doc/annotation_creation.md | 2 +- doc/annotation_database.md | 4 ++-- doc/anonymisation.md | 2 +- doc/tools.md | 4 ++-- doc/umls_metathesaurus.md | 2 +- src/applications/semehr_anon.py | 2 +- src/tools/semehr_anon.sh | 2 +- src/tools/semehr_to_mongo.py | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/annotation_creation.md b/doc/annotation_creation.md index d68ed80a..b7838029 100644 --- a/doc/annotation_creation.md +++ b/doc/annotation_creation.md @@ -47,7 +47,7 @@ semehr_annotate.sh -i anon_dir/ -o annot_dir/ ## DICOM SR annotation -This is simlar to Standalone document annotation but with a preceding +This is similar to Standalone document annotation but with a preceding step of extracting the text from a DICOM file. Also supported is extracting the text from a MongoDB database (where the tags are stored in SMI format). diff --git a/doc/annotation_database.md b/doc/annotation_database.md index d89045b1..f6982833 100644 --- a/doc/annotation_database.md +++ b/doc/annotation_database.md @@ -170,7 +170,7 @@ Pass = 'semehr' DatabaseName = 'semehr' Schema = 'semehr' Table = 'semehr_results' -# Connecto to database +# Connect to database pgConnection = psycopg2.connect(host=Host, user=User, password=Pass, dbname=DatabaseName) # Search for all documents having an annotation where featurename = "cui" featureval = "C0175252" query_obj = [ { featurename: featureval, 'Negation': 'Affirmed' } ] @@ -280,7 +280,7 @@ but is indexed as a PostgreSQL date so it can be searched. The annotations array has elements like this: * `start`, `end`, the character offsets into `redacted_text` * `str`, the original text string -* `id`, an indentifier for this annotation +* `id`, an identifier for this annotation * `negation`, whether affirmed or negated * `temporality`, whether recent or historical * `experiencer`, whether the patient or other diff --git a/doc/anonymisation.md b/doc/anonymisation.md index 8fa87667..b86fa8d0 100644 --- a/doc/anonymisation.md +++ b/doc/anonymisation.md @@ -127,7 +127,7 @@ Rule document structure ``` The `general data structure` of an atom rule. -```javscript +```javascript "RULE_NAME": { "pattern": "REGULAR_EXPRESSION_(WITH_GROUPS)", diff --git a/doc/tools.md b/doc/tools.md index e5563536..4f373dbd 100644 --- a/doc/tools.md +++ b/doc/tools.md @@ -424,7 +424,7 @@ Pass = 'semehr' DatabaseName = 'semehr' Schema = 'semehr' Table = 'semehr_results' -# Connecto to database +# Connect to database pgConnection = psycopg2.connect(host=Host, user=User, password=Pass, dbname=DatabaseName) # Search for all documents having an annotation where featurename = "cui" featureval = "C0175252" query_obj = [ { featurename: featureval, 'Negation': 'Affirmed' } ] @@ -493,7 +493,7 @@ but is indexed as a PostgreSQL date so it can be searched. The annotations array has elements like this: * `start`, `end`, the character offsets into `redacted_text` * `str`, the original text string -* `id`, an indentifier for this annotation +* `id`, an identifier for this annotation * `negation`, whether affirmed or negated * `temporality`, whether recent or historical * `experiencer`, whether the patient or other diff --git a/doc/umls_metathesaurus.md b/doc/umls_metathesaurus.md index 84e5a784..df267fad 100644 --- a/doc/umls_metathesaurus.md +++ b/doc/umls_metathesaurus.md @@ -200,7 +200,7 @@ snomed|cui Describes a Semantic Type. The identifier TUI is a member of a group of similar types tuigroup, and the group has a label tuigrouplabel. This is used to find out -if a concept is related to other concepts that also share a simlar Semantic Type, +if a concept is related to other concepts that also share a similar Semantic Type, i.e. their types are both members of the same Semantic Group. ``` diff --git a/src/applications/semehr_anon.py b/src/applications/semehr_anon.py index 2436934a..9590bee5 100755 --- a/src/applications/semehr_anon.py +++ b/src/applications/semehr_anon.py @@ -9,7 +9,7 @@ # so use the -a (--all) option to write all the others too. # To anonymise *DICOM* files you need CTP_SRAnonTool.sh # (which uses CTP_DicomToText, this script, and CTP_XMLToDicom). -# NOTE: this script has superceded semehr_anon.sh. +# NOTE: this script has supersceded semehr_anon.sh. import argparse, json, logging, re, sys, os, glob from logging import handlers diff --git a/src/tools/semehr_anon.sh b/src/tools/semehr_anon.sh index e6ed453d..1606e3e9 100755 --- a/src/tools/semehr_anon.sh +++ b/src/tools/semehr_anon.sh @@ -6,7 +6,7 @@ # To anonymise *DICOM* files you need CTP_SRAnonTool.sh. # NOTE: this script uses several external programs: # jq, CTP_PhiToXML.py, semehr_redact.py -# NOTE: this script has been superceded by semehr_anon.py. +# NOTE: this script has been supersceded by semehr_anon.py. prog="$0" usage="usage: $prog [-s semehr_dir] -i input -o output" diff --git a/src/tools/semehr_to_mongo.py b/src/tools/semehr_to_mongo.py index 00af0b9e..215d14e9 100755 --- a/src/tools/semehr_to_mongo.py +++ b/src/tools/semehr_to_mongo.py @@ -287,7 +287,7 @@ def mongo_query_feature(featurename, featureval): # OLD x = mongoCursor = mongoCollection.find( { "Mention" : { "$elemMatch": { "features."+featurename : featureval } } } ) # NOW x = mongoCursor = mongoCollection.find( { "annotations" : { "$elemMatch": { featurename : featureval } } } ) # append .count() to get just the number of results - # append .explain() to get the query explaination + # append .explain() to get the query explanation # append .explain()['executionStats'] # Query for annotations which have the feature AND are negated/affirmed query_obj = { featurename : featureval, 'negation':'Negated' }