diff --git a/.gitignore b/.gitignore index 80a94d1b..28e9059d 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,5 @@ Desktop.ini schema_cache_test/ hed_cache/ spec_tests/hed-specification/tests +spec_tests/hed-examples +spec_tests/*.json diff --git a/hed/errors/error_messages.py b/hed/errors/error_messages.py index 06e64008..5a801293 100644 --- a/hed/errors/error_messages.py +++ b/hed/errors/error_messages.py @@ -51,6 +51,15 @@ def val_error_element_deprecatedr(tag): def val_error_invalid_tag_character(tag, problem_tag): return f"Invalid character '{problem_tag}' in tag '{tag}'" +@hed_tag_error(ValidationErrors.INVALID_VALUE_CLASS_CHARACTER, has_sub_tag=True, + actual_code=ValidationErrors.CHARACTER_INVALID) +def val_error_INVALID_VALUE_CLASS_CHARACTER(tag, problem_tag, value_class): + return f"Invalid character '{problem_tag}' in tag '{tag}' for value class '{value_class}'" + +@hed_tag_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, has_sub_tag=True, + actual_code=ValidationErrors.VALUE_INVALID) +def val_error_INVALID_VALUE_CLASS_VALUE(tag, problem_tag, value_class): + return f"'{tag}' has an invalid value portion for value class '{value_class}'" @hed_error(ValidationErrors.TILDES_UNSUPPORTED) def val_error_tildes_not_supported(source_string, char_index): @@ -124,8 +133,11 @@ def val_error_no_valid_tag(tag, problem_tag): @hed_tag_error(ValidationErrors.VALUE_INVALID) -def val_error_no_value(tag): - return f"'{tag}' has an invalid value portion." +def val_error_no_value(tag, value_class=''): + if value_class: + return f"'{tag}' has an invalid value portion because it is not a valid '{value_class}' value." + else: + return f"'{tag}' has an invalid value portion." @hed_error(ValidationErrors.HED_MISSING_REQUIRED_COLUMN, default_severity=ErrorSeverity.WARNING) diff --git a/hed/errors/error_types.py b/hed/errors/error_types.py index 685174b6..b07e3544 100644 --- a/hed/errors/error_types.py +++ b/hed/errors/error_types.py @@ -88,7 +88,8 @@ class ValidationErrors: DUPLICATE_COLUMN_BETWEEN_SOURCES = "DUPLICATE_COLUMN_BETWEEN_SOURCES" HED_BLANK_COLUMN = "HED_BLANK_COLUMN" - + INVALID_VALUE_CLASS_CHARACTER = 'INVALID_VALUE_CLASS_CHARACTER' + INVALID_VALUE_CLASS_VALUE = 'INVALID_VALUE_CLASS_VALUE' INVALID_TAG_CHARACTER = 'invalidTagCharacter' CURLY_BRACE_UNSUPPORTED_HERE = "CURLY_BRACE_UNSUPPORTED_HERE" diff --git a/hed/schema/schema_data/HED_score_2.0.0.xml b/hed/schema/schema_data/HED_score_2.0.0.xml new file mode 100644 index 00000000..3e9d47b5 --- /dev/null +++ b/hed/schema/schema_data/HED_score_2.0.0.xml @@ -0,0 +1,21263 @@ + + + This schema is a Hierarchical Event Descriptors (HED) Library Schema implementation of Standardized Computer-based Organized Reporting of EEG (SCORE)(1-2) for describing events occurring during neuroimaging time series recordings. +The HED-SCORE library schema allows the annotation of electrophysiology recordings using terms from an internationally accepted set of defined terms (SCORE) compatible with the HED framework . +The resulting annotations are understandable to clinicians and directly usable in computer analysis. + +Future extensions may be implemented in the HED-SCORE library schema. +For more information see https://hed-schema-library.readthedocs.io/en/latest/index.html. + + + Modulator + External stimuli / interventions or changes in the alertness level (sleep) that modify: the background activity, or how often a graphoelement is occurring, or change other features of the graphoelement (like intra-burst frequency). For each observed feature, there is an option of specifying how they are influenced by the modulators and procedures that were done during the recording. + + hedId + HED_0042001 + + + inLibrary + score + + + Sleep-modulator + When sleep/drowsiness features are scored during drowsiness, Drowsy should be listed as a modulator (Source: Beniczky ea 2017, Section 7 and Table 2). + + suggestedTag + Drowsy + + + hedId + HED_0042002 + + + inLibrary + score + + + Sleep-deprivation + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042003 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042004 + + + inLibrary + score + + + + + Sleep-following-sleep-deprivation + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042005 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042006 + + + inLibrary + score + + + + + Natural-sleep + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042007 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042008 + + + inLibrary + score + + + + + Induced-sleep + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042009 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042010 + + + inLibrary + score + + + + + Awakening + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042011 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042012 + + + inLibrary + score + + + + + + Medication-modulator + + hedId + HED_0042013 + + + inLibrary + score + + + Medication-administered-during-recording + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042014 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042015 + + + inLibrary + score + + + + + Medication-withdrawal-or-reduction-during-recording + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042016 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042017 + + + inLibrary + score + + + + + + Eye-modulator + + hedId + HED_0042018 + + + inLibrary + score + + + Manual-eye-closure + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042019 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042020 + + + inLibrary + score + + + + + Manual-eye-opening + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042021 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042022 + + + inLibrary + score + + + + + + Stimulation-modulator + + hedId + HED_0042023 + + + inLibrary + score + + + Intermittent-photic-stimulation + Source: Beniczky ea 2017, Table 2. + + suggestedTag + Intermittent-photic-stimulation-effect + + + hedId + HED_0042024 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0042025 + + + inLibrary + score + + + + + Auditory-stimulation + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042026 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042027 + + + inLibrary + score + + + + + Nociceptive-stimulation + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042028 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042029 + + + inLibrary + score + + + + + + Hyperventilation + When selecting hyperventilation from the list, the user is prompted to score the quality of the hyperventilation (excellent effort, good effort, poor effort, refused the procedure, unable to do the procedure). (Source: Beniczky ea 2017, Section 4, Table 2.) + + hedId + HED_0042030 + + + inLibrary + score + + + Hyperventilation-refused-procedure + + hedId + HED_0042031 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042032 + + + inLibrary + score + + + + + Hyperventilation-poor-effort + + hedId + HED_0042033 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042034 + + + inLibrary + score + + + + + Hyperventilation-good-effort + + hedId + HED_0042035 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042036 + + + inLibrary + score + + + + + Hyperventilation-excellent-effort + + hedId + HED_0042037 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042038 + + + inLibrary + score + + + + + + Physical-effort + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042039 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042040 + + + inLibrary + score + + + + + Cognitive-task + Source: Beniczky ea 2017, Table 2. + + hedId + HED_0042041 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042042 + + + inLibrary + score + + + + + Other-modulator-or-procedure + Free text describing other modulators or procedures. (Source: Beniczky ea 2017, Table 2.) + + requireChild + + + hedId + HED_0042043 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042044 + + + inLibrary + score + + + + + + Background-activity + An EEG activity representing the setting in which a given normal or abnormal pattern appears and from which such pattern is distinguished (Source: Beniczky ea 2013, Appendix S1.) + + hedId + HED_0042045 + + + inLibrary + score + + + Posterior-dominant-rhythm + Rhythmic activity occurring during wakefulness over the posterior regions of the head, generally with maximum amplitudes over the occipital areas. Amplitude varies. Best seen with eyes closed and during physical relaxation and relative mental inactivity. Blocked or attenuated by attention, especially visual, and mental effort. In adults this is the alpha rhythm, and the frequency is 8 to 13 Hz. However the frequency can be higher or lower than this range (often a supra or sub harmonic of alpha frequency) and is called alpha variant rhythm (fast and slow alpha variant rhythm). In children, the normal range of the frequency of the posterior dominant rhythm is age-dependant. (Source: Beniczky ea 2013, Appendix S2; suggested tags from Beniczky ea 2017, Table 4.) + + suggestedTag + Feature-significance-to-recording + Feature-frequency + Posterior-dominant-rhythm-property + + + hedId + HED_0042046 + + + inLibrary + score + + + + Mu-rhythm + EEG rhythm at 7-11 Hz composed of arch-shaped waves occurring over the central or centro-parietal regions of the scalp during wakefulness. Amplitudes varies but is mostly below 50 microV. Blocked or attenuated most clearly by contralateral movement, thought of movement, readiness to move or tactile stimulation. (Source: Beniczky ea 2013, Appendix S2.) + + suggestedTag + Feature-frequency + Feature-significance-to-recording + Categorical-location-value + Sensor-list + + + hedId + HED_0042047 + + + inLibrary + score + + + + Other-organized-rhythm + EEG activity consisting of waves of approximately constant period that are considered part of the background (ongoing) activity, but do not fulfill the criteria of the posterior dominant rhythm. (Source: Beniczky ea 2013, Appendix S2.) + + requireChild + + + suggestedTag + Rhythmic-property + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042048 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042049 + + + inLibrary + score + + + + + Background-activity-special-feature + Special features provide scoring options for the background activity of critically ill patients. (Source: Beniczky ea 2017, Section 6.) + + hedId + HED_0042050 + + + inLibrary + score + + + Continuous-background-activity + Source: Beniczky ea 2017, Section 6. + + suggestedTag + Rhythmic-property + Categorical-location-value + Sensor-list + + + hedId + HED_0042051 + + + inLibrary + score + + + + Nearly-continuous-background-activity + Source: Beniczky ea 2017, Section 6. + + suggestedTag + Rhythmic-property + Categorical-location-value + Sensor-list + + + hedId + HED_0042052 + + + inLibrary + score + + + + Discontinuous-background-activity + Source: Beniczky ea 2017, Section 6. + + suggestedTag + Rhythmic-property + Categorical-location-value + Sensor-list + + + hedId + HED_0042053 + + + inLibrary + score + + + + Background-burst-suppression + EEG pattern consisting of bursts (activity appearing and disappearing abruptly) interrupted by periods of low amplitude (below 20 microV). This pattern occurs simultaneously over all head regions. (Source: Beniczky ea 2013, Appendix S2; Beniczky ea 2017, Section 6.) + + suggestedTag + Categorical-location-value + Sensor-list + + + hedId + HED_0042054 + + + inLibrary + score + + + + Background-burst-attenuation + Source: Beniczky ea 2017, Section 6. + + suggestedTag + Categorical-location-value + Sensor-list + + + hedId + HED_0042055 + + + inLibrary + score + + + + Background-activity-suppression + Periods showing activity under 10 microV (referential montage) and interrupting the background (ongoing) activity. (Source: Beniczky ea 2013, Appendix S2; Beniczky ea 2017, Section 6.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + + + hedId + HED_0042056 + + + inLibrary + score + + + + Electrocerebral-inactivity + Absence of any ongoing cortical electric activities; in all leads EEG is isoelectric or only contains artifacts. Sensitivity has to be increased up to 2 microV/mm; recording time: at least 30 minutes. (Source: Beniczky ea 2013, Appendix S2; Beniczky ea 2017, Section 6.) + + hedId + HED_0042057 + + + inLibrary + score + + + + + + Critically-ill-patient-patterns + Rhythmic or periodic patterns in critically ill patients (RPPs) are scored according to the 2012 version of the American Clinical Neurophysiology Society Standardized Critical Care EEG Terminology (Source: Hirsch ea 2013; Beniczky ea 2017, Section 9). + + hedId + HED_0042058 + + + inLibrary + score + + + Critically-ill-patient-periodic-discharges + Periodic discharges (PDs): Periodic - repetition of a waveform with relatively uniform morphology and duration with a quantifiable inter-discharge interval between consecutive waveforms and recurrence of the waveform at nearly regular intervals. (Source: Hirsch ea 2013; Suggested tags from Beniczky ea 2017, Table 8.) + + suggestedTag + RPP-morphology + Categorical-location-value + Sensor-list + Feature-frequency + RPP-time-related-feature + + + hedId + HED_0042059 + + + inLibrary + score + + + + Rhythmic-delta-activity + Rhythmic Delta Activity (RDA): Rhythmic - repetition of a waveform with relatively uniform morphology and duration, and without an interval between consecutive waveforms. RDA - rhythmic activity less than or equal to 4 Hz. The duration of one cycle (i.e., the period) of the rhythmic pattern should vary by less than 50 percent from the duration of the subsequent cycle for the majority (greater than 50 percent) of cycle pairs to qualify as rhythmic. (Source: Hirsch ea 2013; Suggested tags from Beniczky ea 2017, Table 8.) + + suggestedTag + RPP-with-superimposed-activity + RPP-absolute-amplitude + Categorical-location-value + Sensor-list + Feature-frequency + RPP-time-related-feature + + + hedId + HED_0042060 + + + inLibrary + score + + + + Spike-or-sharp-and-wave + Spike-and-wave or Sharp-and-wave (SW) - polyspike, spike or sharp wave consistently followed by a slow wave in a regularly repeating and alternating pattern (spike-wave-spike-wave-spike-wave), with a consistent relationship between the spike (or polyspike or sharp wave) component and the slow wave; and with no interval between one spike-wave complex and the next (if there is an interval, this would qualify as PDs, where each discharge is a spike-and- wave). (Source: Hirsch ea 2013; Suggested tags from Beniczky ea 2017, Table 8.) + + suggestedTag + RPP-sharpness + Number-of-RPP-phases + Triphasic-morphology + RPP-absolute-amplitude + RPP-relative-amplitude + RPP-polarity + Categorical-location-value + Sensor-list + Multifocal-feature + Feature-frequency + RPP-time-related-feature + + + hedId + HED_0042061 + + + inLibrary + score + + + + + Episode + Clinical episode or electrographic seizure. (Source: Beniczky ea 2013, Appendix S1.) + + hedId + HED_0042062 + + + inLibrary + score + + + Epileptic-seizure + The ILAE seizure classification divides seizures into focal, generalized onset, or unknown onset. (Source: Beniczky ea 2017, Table 9, Supplement 1; Selection-tree and list of seizure-types, according to the current ILAE seizure classification, Fisher ea 2017.) + + suggestedTag + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042063 + + + inLibrary + score + + + Focal-onset-epileptic-seizure + A focal seizure originates within networks limited to one hemisphere. They may be discretely localized or more widely distributed. Focal seizures may originate in subcortical structures. Focal seizures are optionally subdivided into focal aware and focal impaired awareness seizures. Specific motor and nonmotor classifiers may be added. (Source: Fisher ea 2017, Table 2 and Key Points; Suggested tags from Fisher ea 2017, Figure 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code I.) + + suggestedTag + Automatism-seizure + Atonic-seizure + Clonic-seizure + Epileptic-spasm + Hyperkinetic-seizure + Myoclonic-seizure + Tonic-seizure + Autonomic-seizure + Behavior-arrest-seizure + Cognitive-seizure + Emotional-seizure + Sensory-seizure + + + hedId + HED_0042064 + + + inLibrary + score + + + Aware-focal-onset-epileptic-seizure + Focal onset and maintained awareness (knowledge of self or environment). (Source: Fisher ea 2017, Table 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code I.A.) + + hedId + HED_0042065 + + + inLibrary + score + + + + Impaired-awareness-focal-onset-epileptic-seizure + Focal onset and impaired or lost awareness (knowledge of self or environment) is a feature of focal impaired awareness seizures, previously called complex partial seizures. (Source: Fisher ea 2017, Table 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code I.B.) + + hedId + HED_0042066 + + + inLibrary + score + + + + Awareness-unknown-focal-onset-epileptic-seizure + Focal onset and awareness (knowledge of self or environment) unknown or not specified. (Source: Fisher ea 2017, Table 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code I.C.) + + hedId + HED_0042067 + + + inLibrary + score + + + + Focal-to-bilateral-tonic-clonic-focal-onset-epileptic-seizure + A seizure type with focal onset, with awareness or impaired awareness, either motor or non-motor, progressing to bilateral tonic clonic activity. The prior term was seizure with partial onset with secondary generalization. (Source: Fisher ea 2017, Table 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code I.D.01.) + + hedId + HED_0042068 + + + inLibrary + score + + + + + Generalized-onset-epileptic-seizure + Generalized seizures originate at some point within, and rapidly engaging, bilaterally distributed networks. Generalized onset seizures can be motor: tonic clonic, clonic, tonic, myoclonic, myoclonic tonic clonic, myoclonic atonic, atonic, and epileptic spasms. Generalized onset seizures can also be nonmotor (absence): typical absence, atypical absence, myoclonic absence, or absence with eyelid myoclonia. (Source: Fisher ea 2017, Table 2 and Key Points; Suggested tags from Fisher ea 2017, Figure 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code II.) + + suggestedTag + Tonic-clonic-seizure + Clonic-seizure + Tonic-seizure + Myoclonic-seizure + Myoclonic-tonic-clonic-seizure + Myoclonic-atonic-seizure + Atonic-seizure + Epileptic-spasm + Typical-absence-seizure + Atypical-absence-seizure + Myoclonic-absence-seizure + Eyelid-myoclonia-seizure + + + hedId + HED_0042069 + + + inLibrary + score + + + + Unknown-onset-epileptic-seizure + A seizure of unknown onset may still evidence certain defining motor (e.g., tonic clonic) or nonmotor (e.g., behavior arrest) characteristics. With further information or future observed seizures, a reclassification of unknown-onset seizures into focal or generalized-onset categories may become possible. Therefore, “unknown-onset” is not a characteristic of the seizure, but a convenient placeholder for our ignorance. (Source: Fisher ea 2017, page 532; Suggested tags from Fisher ea 2017, Figure 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code III.) + + suggestedTag + Tonic-clonic-seizure + Epileptic-spasm + Behavior-arrest-seizure + + + hedId + HED_0042070 + + + inLibrary + score + + + Unclassified-epileptic-seizure + Referring to a seizure type that cannot be described by the ILAE 2017 classification either because of inadequate information or unusual clinical features. (Source: Fisher ea 2017, Table 2; Beniczky ea 2017, Supplement 1, ILAE seizure classification code III.C.01) + + hedId + HED_0042071 + + + inLibrary + score + + + + + + Electroencephalographic-seizure + Refers usually to non convulsive status. Ictal EEG: rhythmic discharge or spike and wave pattern with definite evolution in frequency, location, or morphology lasting at least 10 s; evolution in amplitude alone did not qualify. (Source: Beniczky ea 2013, Appendix S5; Beniczky ea 2017, Table 9.) + + suggestedTag + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042072 + + + inLibrary + score + + + + Seizure-PNES + Psychogenic non-epileptic seizure. Paroxysmal events that mimic (or are confused with) epileptic seizures, but which do not result from epileptic activity; they lack the EEG ictal features during the ictus. (Source: Beniczky ea 2013, Appendix S5; Beniczky ea 2017, Table 9.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042073 + + + inLibrary + score + + + + Sleep-related-episode + (Source: Beniczky ea 2017, Table 9.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042074 + + + inLibrary + score + + + Sleep-related-arousal + Normal arousal. (Source: Beniczky ea 2017, Table 9.) + + hedId + HED_0042075 + + + inLibrary + score + + + + Benign-sleep-myoclonus + A distinctive disorder of sleep characterized by a) neonatal onset, b) rhythmic myoclonic jerks only during sleep and c) abrupt and consistent cessation with arousal, d) absence of concomitant electrographic changes suggestive of seizures, and e) good outcome. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042076 + + + inLibrary + score + + + + Confusional-arousal + Episode of non epileptic nature included in NREM parasomnias, characterized by sudden arousal and complex behavior but without full alertness, usually lasting a few minutes and occurring almost in all children at least occasionally. Amnesia of the episode is the rule. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042077 + + + inLibrary + score + + + + Cataplexy + A sudden decrement in muscle tone and loss of deep tendon reflexes, leading to muscle weakness, paralysis, or postural collapse. Cataplexy usually is precipitated by an outburst of emotional expression-notably laughter, anger, or startle. It is one of the tetrad of symptoms of narcolepsy. During cataplexy, respiration and voluntary eye movements are not compromised. Consciousness is preserved. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042078 + + + inLibrary + score + + + + Sleep-periodic-limb-movement + PLMS. Periodic limb movement in sleep. Episodes are characterized by brief (0.5- to 5.0-second) lower-extremity movements during sleep, which typically occur at 20- to 40-second intervals, most commonly during the first 3 hours of sleep. The affected individual is usually not aware of the movements or of the transient partial arousals. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042079 + + + inLibrary + score + + + + REM-sleep-behavioral-disorder + REM sleep behavioral disorder. Episodes characterized by: a) presence of REM sleep without atonia (RSWA) on polysomnography (PSG); b) presence of at least 1 of the following conditions - (1) Sleep-related behaviors, by history, that have been injurious, potentially injurious, or disruptive (example: dream enactment behavior); (2) abnormal REM sleep behavior documented during PSG monitoring; (3) absence of epileptiform activity on electroencephalogram (EEG) during REM sleep (unless RBD can be clearly distinguished from any concurrent REM sleep-related seizure disorder); (4) sleep disorder not better explained by another sleep disorder, a medical or neurologic disorder, a mental disorder, medication use, or a substance use disorder. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042080 + + + inLibrary + score + + + + Sleep-walking + Episodes characterized by ambulation during sleep; the patient is difficult to arouse during an episode, and is usually amnesic following the episode. Episodes usually occur in the first third of the night during slow wave sleep. Polysomnographic recordings demonstrate 2 abnormalities during the first sleep cycle: frequent, brief, non-behavioral EEG-defined arousals prior to the somnambulistic episode and abnormally low gamma (0.75-2.0 Hz) EEG power on spectral analysis, correlating with high-voltage (hyper-synchronic gamma) waves lasting 10 to 15 s occurring just prior to the movement. This is followed by stage I NREM sleep, and there is no evidence of complete awakening. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042081 + + + inLibrary + score + + + + + Pediatric-episode + (Source: Beniczky ea 2017, Table 9.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042082 + + + inLibrary + score + + + Hyperekplexia + Disorder characterized by exaggerated startle response and hypertonicity that may occur during the first year of life and in severe cases during the neonatal period. Children usually present with marked irritability and recurrent startles in response to handling and sounds. Severely affected infants can have severe jerks and stiffening, sometimes with breath-holding spells. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042083 + + + inLibrary + score + + + + Jactatio-capitis-nocturna + Relatively common in normal children at the time of going to bed, especially during the first year of life, the rhythmic head movements persist during sleep. Usually, these phenomena disappear before 3 years of age. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042084 + + + inLibrary + score + + + + Pavor-nocturnus + A nocturnal episode characterized by age of onset of less than five years (mean age 18 months, with peak prevalence at five to seven years), appearance of signs of panic two hours after falling asleep with crying, screams, a fearful expression, inability to recognize other people including parents (for a duration of 5-15 minutes), amnesia upon awakening. Pavor nocturnus occurs in patients almost every night for months or years (but the frequency is highly variable and may be as low as once a month) and is likely to disappear spontaneously at the age of six to eight years. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042085 + + + inLibrary + score + + + + Pediatric-stereotypical-behavior-episode + Repetitive motor behavior in children, typically rhythmic and persistent; usually not paroxysmal and rarely suggest epilepsy. They include headbanging, head-rolling, jactatio capitis nocturna, body rocking, buccal or lingual movements, hand flapping and related mannerisms, repetitive hand-waving (to self-induce photosensitive seizures).(Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042086 + + + inLibrary + score + + + + + Paroxysmal-motor-event + Paroxysmal phenomena during neonatal or childhood periods characterized by recurrent motor or behavioral signs or symptoms that must be distinguished from epileptic disorders. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042087 + + + inLibrary + score + + + + Syncope + Episode with loss of consciousness and muscle tone that is abrupt in onset, of short duration and followed by rapid recovery; it occurs in response to transient impairment of cerebral perfusion. Typical prodromal symptoms often herald onset of syncope and postictal symptoms are minimal. Syncopal convulsions resulting from cerebral anoxia are common but are not a form of epilepsy, nor are there any accompanying EEG ictal discharges. (Source: Beniczky ea 2017, Table 9; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Feature-significance-to-recording + Episode-consciousness-affected + Episode-awareness + Episode-prodrome + Episode-tongue-biting + + + hedId + HED_0042088 + + + inLibrary + score + + + + Other-episode + + requireChild + + + hedId + HED_0042089 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042090 + + + inLibrary + score + + + + + + Feature-property + Descriptive element similar to main HED /Property. Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs. + + hedId + HED_0042091 + + + inLibrary + score + + + Signal-morphology-property + Signal morphology attributes relevant to features of background, interictal or ictal activity. (Source: Beniczky ea 2017, Table 5, Table 8, Table 12.) + + hedId + HED_0042092 + + + inLibrary + score + + + Rhythmic-property + Rhythmic activity can be observed during background, interictal or ictal activity and HED-SCORE therefore describes this as an property/attribute. (Source: Beniczky ea 2017, Table 5, Table 12, Table 14.) + + hedId + HED_0042093 + + + inLibrary + score + + + Delta-activity + Rhythmic activity in the delta frequency range (under 4 Hz). (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S2, S6.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042094 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042095 + + + inLibrary + score + + + + + Theta-activity + Rhythmic activity in the theta frequency range (4-8 Hz). (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S2, S6.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042096 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042097 + + + inLibrary + score + + + + + Alpha-activity + Rhythmic activity in the alpha frequency range (8-13 Hz), but not a part of the posterior dominant rhythm. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S2, S6.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042098 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042099 + + + inLibrary + score + + + + + Beta-activity + Rhythmic activity in the beta frequency range (14-40 Hz). (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S2, S6.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042100 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042101 + + + inLibrary + score + + + + + Gamma-activity + Rhythmic activity in the gamma frequency range. (Source: Beniczky ea 2017, Table 5.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042102 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042103 + + + inLibrary + score + + + + + Polymorphic-delta-activity + EEG activity consisting of waves in the delta range (over 250 ms duration for each wave) but of different morphology. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042104 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042105 + + + inLibrary + score + + + + + Frontal-intermittent-rhythmic-delta-activity + Frontal intermittent rhythmic delta activity (FIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 1.5-2.5 Hz over the frontal areas of one or both sides of the head. Comment: most commonly associated with unspecified encephalopathy, in adults. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042106 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042107 + + + inLibrary + score + + + + + Occipital-intermittent-rhythmic-delta-activity + Occipital intermittent rhythmic delta activity (OIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at 2-3 Hz over the occipital or posterior head regions of one or both sides of the head. Frequently blocked or attenuated by opening the eyes. Comment: most commonly associated with unspecified encephalopathy, in children. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042108 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042109 + + + inLibrary + score + + + + + Temporal-intermittent-rhythmic-delta-activity + Temporal intermittent rhythmic delta activity (TIRDA). Fairly regular or approximately sinusoidal waves, mostly occurring in bursts at over the temporal areas of one side of the head. Comment: most commonly associated with temporal lobe epilepsy. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042110 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042111 + + + inLibrary + score + + + + + + Spike + A transient, clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale and duration from 20 to under 70 ms, i.e. 1/50-1/15 s approximately. Main component is generally negative relative to other areas. Amplitude varies. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042112 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042113 + + + inLibrary + score + + + + + Spike-and-slow-wave + A pattern consisting of a spike followed by a slow wave. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042114 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042115 + + + inLibrary + score + + + + + Runs-of-rapid-spikes + Bursts of spike discharges at a rate from 10 to 25/sec (in most cases somewhat irregular). The bursts last more than 2 seconds (usually 2 to 10 seconds) and the runs are typically seen in sleep. Synonyms: rhythmic spikes, generalized paroxysmal fast activity, fast paroxysmal rhythms, grand mal discharge, fast beta activity. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042116 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042117 + + + inLibrary + score + + + + + Polyspikes + Two or more consecutive spikes. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042118 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042119 + + + inLibrary + score + + + + + Polyspike-and-slow-wave + Two or more consecutive spikes associated with one or more slow waves. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042120 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042121 + + + inLibrary + score + + + + + Sharp-wave + A transient clearly distinguished from background activity, with pointed peak at a conventional paper speed or time scale, and duration of 70-200 ms, i.e. over 1/4-1/5 s approximately. Main component is generally negative relative to other areas. Amplitude varies. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042122 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042123 + + + inLibrary + score + + + + + Sharp-and-slow-wave + A sequence of a sharp wave and a slow wave. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042124 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042125 + + + inLibrary + score + + + + + Slow-sharp-wave + A transient that bears all the characteristics of a sharp-wave, but exceeds 200 ms. Synonym: blunted sharp wave. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042126 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042127 + + + inLibrary + score + + + + + High-frequency-oscillation + High Frequency Oscillation (HFO). Oscillations with a frequency higher than 80 Hz. (Source: Wikipedia; Beniczky ea 2017, Table 5.) + + hedId + HED_0042128 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042129 + + + inLibrary + score + + + + + Hypsarrhythmia-classic + Pattern consisting of diffuse chaotic high voltage (more than 300 μV) irregular slow waves interspersed with multiregional spikes and sharp waves over both hemispheres. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042130 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042131 + + + inLibrary + score + + + + + Hypsarrhythmia-modified + Pattern consisting of diffuse chaotic high voltage (more than 300 μV) irregular slow waves interspersed with multiregional spikes and sharp waves over both hemispheres. (Source: Beniczky ea 2017, Table 5; Beniczky ea 2013, Appendix S4.) + + hedId + HED_0042132 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042133 + + + inLibrary + score + + + + + Fast-spike-activity + A burst consisting of a sequence of spikes. Duration greater than 1 s. Frequency at least in the alpha range. (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042134 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042135 + + + inLibrary + score + + + + + Low-voltage-fast-activity + Refers to the fast, and often recruiting activity which can be recorded at the onset of an ictal discharge, particularly in invasive EEG recording of a seizure. (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042136 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042137 + + + inLibrary + score + + + + + Polysharp-waves + A sequence of two or more sharp-waves. (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042138 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042139 + + + inLibrary + score + + + + + Slow-wave-large-amplitude + Slow wave of large amplitude. (Source: Beniczky ea 2017, Table 12.) + + hedId + HED_0042140 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042141 + + + inLibrary + score + + + + + Irregular-delta-or-theta-activity + EEG activity consisting of repetitive waves of inconsistent wave-duration but in delta and/or theta range (greater than 125 ms). (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042142 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042143 + + + inLibrary + score + + + + + Electrodecremental-change + Sudden desynchronization of electrical activity. (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042144 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042145 + + + inLibrary + score + + + + + DC-shift + Shift of negative polarity of the direct current recordings, during seizures. (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042146 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042147 + + + inLibrary + score + + + + + Disappearance-of-ongoing-activity + Disappearance of the EEG activity that preceded the ictal event but still remnants of background activity (thus not enough to name it electrodecremental change). (Source: Beniczky ea 2017, Table 12; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042148 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042149 + + + inLibrary + score + + + + + RPP-morphology + Modifier terms for Rhythmic or Periodic Patterns in critically ill patients (RPPs). (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Feature-amplitude + + + hedId + HED_0042150 + + + inLibrary + score + + + RPP-with-superimposed-activity + Superimposed activity (for PDs and RDA). (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Property-not-possible-to-determine + + + hedId + HED_0042151 + + + inLibrary + score + + + Superimposed-fast-activity + Superimposed fast activity. (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042152 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042153 + + + inLibrary + score + + + + + Superimposed-rhythmic-activity + Superimposed rhythmic activity (for PDs only). (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042154 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042155 + + + inLibrary + score + + + + + Superimposed-sharp-waves-or-spikes + Superimposed sharp waves or spikes (for RDA only). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042156 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042157 + + + inLibrary + score + + + + + + RPP-sharpness + Sharpness (for PDs and SW). (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Property-not-possible-to-determine + + + hedId + HED_0042158 + + + inLibrary + score + + + RPP-spiky + Spiky (<70 ms, measured at the baseline). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042159 + + + inLibrary + score + + + + RPP-sharp + Sharp (70–200 ms). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042160 + + + inLibrary + score + + + + RPP-sharply-contoured + Sharply contoured. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042161 + + + inLibrary + score + + + + RPP-blunt + Blunt. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042162 + + + inLibrary + score + + + + + Number-of-RPP-phases + Number of phases (for PDs and SW): 1, 2 or 3. (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Property-not-possible-to-determine + Greater-than + + + hedId + HED_0042163 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042164 + + + inLibrary + score + + + + + Triphasic-morphology + Waves with three distinct phases (for PDs and SW). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042165 + + + inLibrary + score + + + + RPP-absolute-amplitude + Absolute amplitude (for PDs, RDA, SW). Can use suggested tags for amplitude range. Very low, (Feature-amplitude, (Less-than, (Feature-amplitude/20 uv))): less than 20 microV, Low: 20 to 49 microV, Medium: 50 to 199 microV, High: Greater than 200 microV. (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Property-not-possible-to-determine + Low + Medium + High + + + hedId + HED_0042166 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + electricPotentialUnits + + + hedId + HED_0042167 + + + inLibrary + score + + + + + RPP-relative-amplitude + Relative amplitude (for PDs), should indicate if it's less than or equal to 2 or greater than 2. (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Property-not-possible-to-determine + Less-than-or-equal-to + Greater-than + + + hedId + HED_0042168 + + + inLibrary + score + + + + RPP-polarity + Polarity (for PDs and SW). (Source: Beniczky ea 2017, Table 8.) + + suggestedTag + Positive + Negative + Property-not-possible-to-determine + + + hedId + HED_0042169 + + + inLibrary + score + + + RPP-tangential-polarity + Tangential/horizontal dipole. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042170 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042171 + + + inLibrary + score + + + + + + + + Sensor-list + Lists all corresponding sensors (electrodes/channels in montage). The sensor-group is selected from a list defined in the site-settings for each EEG-lab. + + requireChild + + + hedId + HED_0042172 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042173 + + + inLibrary + score + + + + + Source-analysis-property + In case source imaging is done, the results are scored at sublobar level: frontal (perisylvian-superior surface; lateral; mesial; polar; orbitofrontal), temporal (polar; basal, lateral-anterior; lateral-posterior; perisylvian-inferior surface), central (lateral convexity; mesial; central sulcus – anterior surface, central sulcus – posterior surface; opercular), parietal (lateral-convexity; mesial; opercular), occipital (lateral; mesial, basal) and insula. (Source: Beniczky ea 2017, Section 8.) + + hedId + HED_0042174 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042175 + + + inLibrary + score + + + + + Location-property + Location can be scored for features. Semiologic feature can also be characterized by the somatotopic modifier (i.e. the part of the body where it occurs). In this respect, laterality (left, right, symmetric, asymmetric, left greater than right, right greater than left), body part (eyelid, face, arm, leg, trunk, visceral, left/right) and centricity (axial (trunk), proximal limb, distal limb). (Source: Beniczky ea 2017, Sections 8 and 10) + + suggestedTag + Left + Right + Body-part + + + hedId + HED_0042176 + + + inLibrary + score + + + Feature-propagation + When propagation within the graphoelement is observed, first the location of the onset region is scored. Then, the location of the propagation can be noted. + + suggestedTag + Body-part + Sensor-list + + + hedId + HED_0042177 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042178 + + + inLibrary + score + + + + + Multifocal-feature + When the same interictal graphoelement is observed bilaterally and at least in three independent locations, can score them using one entry, and choosing multifocal as a descriptor of the locations of the given interictal graphoelements, optionally emphasizing the involved, and the most active sites. + + suggestedTag + Property-not-possible-to-determine + + + hedId + HED_0042179 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042180 + + + inLibrary + score + + + + + + Modulators-property + For each described graphoelement, the influence of the modulators can be scored. Only modulators present in the recording are scored. (Source: Beniczky ea 2017, Section 10.) + + hedId + HED_0042181 + + + inLibrary + score + + + Modulators-reactivity + Susceptibility of individual rhythms or the EEG as a whole to change following sensory stimulation or other physiologic actions (Source: Beniczky ea 2013, Appendix S2). The type of stimulus can be a modulator or can be specified in free-text. + + suggestedTag + Modulator + Feature-stopped-by + Increasing + Decreasing + + + hedId + HED_0042182 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042183 + + + inLibrary + score + + + + + Facilitating-factor + The facilitating factors (if known) can be selected: alcohol (Suggested tag: Intoxicated), awakening, catamenial, fever, sleep, sleep-deprivation, other (free text). Facilitating factors are defined as transient and sporadic endogenous or exogenous elements capable of augmenting seizure incidence (increasing the likelihood of seizure occurrence). (Source: Beniczky ea 2013.) + + suggestedTag + Catamenial + Fever + Intoxicated + Awake + Asleep + Sleep-deprivation + + + hedId + HED_0042184 + + + inLibrary + score + + + Other-facilitating-factor + + hedId + HED_0042185 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042186 + + + inLibrary + score + + + + + + Provocative-factor + Provocative factors are defined as transient and sporadic endogenous or exogenous elements capable of evoking/triggering seizures immediately following the exposure to it. (Source: Beniczky ea 2013.) + + suggestedTag + Hyperventilation + + + hedId + HED_0042187 + + + inLibrary + score + + + Reflex-provoked + + hedId + HED_0042188 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042189 + + + inLibrary + score + + + + + Other-provocative-factor + + hedId + HED_0042190 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042191 + + + inLibrary + score + + + + + + Intermittent-photic-stimulation-effect + The effect of Intermittent Photic Stimulation (IPS) is scored according to the terminology proposed by Kasteleijn-Nolst Trenité ea (2001). (Source: Beniczky ea 2017.) + + suggestedTag + Normal + + + hedId + HED_0042192 + + + inLibrary + score + + + Posterior-stimulus-dependent-response + Anomalous steady-state VEPs, of unusually sharp waveform or high amplitude. Some types have clinical correlates, for instance, occipital spikes after suppression of generalized PPR by medication and high-amplitude VEPs in neuronal ceroid lipofuscinosis. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042193 + + + inLibrary + score + + + + Posterior-stimulus-independent-response-limited + Limited to the stimulus train: Activity confined to or maximal at the back of the head and not at the flash frequency or at a harmonic thereof. The term includes delta and theta activity and frank epileptiform patterns. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042194 + + + inLibrary + score + + + + Posterior-stimulus-independent-response-self-sustained + Self-sustaining: Self-sustaining posterior stimulus-independent responses that outlast the stimulus train. These often last many seconds and may evolve to an overt seizure. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042195 + + + inLibrary + score + + + + Generalized-photoparoxysmal-response-limited + Limited to the stimulus train: Comprises multiple spikes or spike-and-wave activity, which are apparently generalized, but may be of greater amplitude at the front or back of the head. It is termed a photoconvulsive response (PCR) by Bickford et al., and corresponds to type 4 response of Waltz et al. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042196 + + + inLibrary + score + + + + Generalized-photoparoxysmal-response-self-sustained + Self-sustaining: Generalized PPR continuing after stimulation. This may not be demonstrated unless the stimulus train is terminated as soon as a generalized PPR is identified. It was termed prolonged photoconvulsive response by Reilly and Peters, and has a strong association with epilepsy and visually induced seizures in patients referred for clinical EEG examination. Its prevalence in asymptomatic general populations is unknown, but was found in five of 13,658 apparently healthy aircrew by Gregory et al. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042197 + + + inLibrary + score + + + + Activation-of-pre-existing-epileptogenic-area + Rarely, photic stimulation may activate an epileptogenic cortex, which is also spontaneously active; IPS could then also elicit a seizure by stimulating this, usually posterior located, area. It is questionable whether this should be considered a photoparoxysmal response (PPR), and it does not figure in established classifications. (Source: Trenité ea 2001; Beniczky ea 2017, Table 7.) + + suggestedTag + Feature-frequency + + + hedId + HED_0042198 + + + inLibrary + score + + + + + + Time-related-property + Estimates of how often a graphoelement is seen in the recording. (Source: Beniczky ea 2017, Table 6, Table 8.) + + hedId + HED_0042199 + + + inLibrary + score + + + Appearance-mode + Describes how the non-ictal EEG pattern/graphoelement is distributed through the recording. Occurrence of the non-ictal EEG pattern / graphoelement can be Random, Repetitive or Varying. Random: occurring without any rhythmicity / periodicity, Repetitive: occurring at an approximately regular rate / interval (generally of 1 to several seconds). Variable: occurring sometimes rhythmic or periodic, other times random, throughout the recording. (Source: Beniczky ea 2017, Table 6; Beniczky ea 2013, Appendix 4.) + + suggestedTag + Property-not-possible-to-determine + Random + Repetitive + Varying + + + hedId + HED_0042200 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042201 + + + inLibrary + score + + + + + Discharge-pattern + Describes the organization of the EEG signal within the discharge (distinguish between single and repetitive discharges). (Source: Beniczky ea 2017, Table 6; Beniczky ea 2013, Appendix 4.) + + hedId + HED_0042202 + + + inLibrary + score + + + Single-discharge + Applies to the intra-burst pattern: a graphoelement that is not repetitive; before and after the graphoelement one can distinguish the background activity. (Source: Beniczky ea 2017, Table 6; Beniczky ea 2013, Appendix 4.) + + suggestedTag + Feature-incidence + + + hedId + HED_0042203 + + + inLibrary + score + + + + Rhythmic-trains-or-bursts + Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at approximately constant period. (Source: Beniczky ea 2017, Table 6; Beniczky ea 2013, Appendix 4.) + + suggestedTag + Feature-prevalence + Feature-frequency + + + hedId + HED_0042204 + + + inLibrary + score + + + + Arrhythmic-trains-or-bursts + Applies to the intra-burst pattern: a non-ictal graphoelement that repeats itself without returning to the background activity between them. The graphoelements within this repetition occur at inconstant period. (Source: Beniczky ea 2017, Table 6; Beniczky ea 2013, Appendix 4.) + + suggestedTag + Feature-prevalence + + + hedId + HED_0042205 + + + inLibrary + score + + + + Fragmented-discharge + Source: Beniczky ea 2017, Table 6. + + hedId + HED_0042206 + + + inLibrary + score + + + + + RPP-time-related-feature + Time related feature for Rhythmic or Periodic Patterns in critically ill patients (RPPs). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042207 + + + inLibrary + score + + + RPP-duration + Duration (for PDs, RDA and SW). The suggestedTag Property-not-possible-to-determine may be used if it is not possible to determine. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042208 + + + inLibrary + score + + + Very-brief-RPP-duration + Less than 10 sec. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042209 + + + inLibrary + score + + + + Brief-RPP-duration + 10 to 59 sec. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042210 + + + inLibrary + score + + + + Intermediate-RPP-duration + 1 to 4.9 min. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042211 + + + inLibrary + score + + + + Long-RPP-duration + 5 to 59 min. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042212 + + + inLibrary + score + + + + Very-long-RPP-duration + Greater than 1 hour. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042213 + + + inLibrary + score + + + + + RPP-onset + Onset (for PDs, RDA and SW). The suggestedTag Property-not-possible-to-determine may be used if it is not possible to determine. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042214 + + + inLibrary + score + + + Sudden-RPP-onset + Sudden (progressing from absent to well developed within 3 s.). (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042215 + + + inLibrary + score + + + + Gradual-RPP-onset + Gradual onset. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042216 + + + inLibrary + score + + + + + RPP-dynamics + Dynamics (for PDs, RDA and SW). The suggestedTag Property-not-possible-to-determine may be used if it is not possible to determine. (Source: Beniczky ea 2017, Table 8.) + + hedId + HED_0042217 + + + inLibrary + score + + + Evolving-RPP-dynamics + Source: Beniczky ea 2017, Table 8. + + hedId + HED_0042218 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042219 + + + inLibrary + score + + + + + Fluctuating-RPP-dynamics + Source: Beniczky ea 2017, Table 8. + + hedId + HED_0042220 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042221 + + + inLibrary + score + + + + + Static-RPP-dynamics + Source: Beniczky ea 2017, Table 8. + + hedId + HED_0042222 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042223 + + + inLibrary + score + + + + + + + Feature-incidence + For single discharges, estimates of how often features are seen in the recording are scored as incidence (how often it occurs/time-epoch). (Source: Beniczky ea 2017, Section 8, Table 6.) + + hedId + HED_0042224 + + + inLibrary + score + + + One-time-incidence + Source: Beniczky ea 2017, Table 6. + + hedId + HED_0042225 + + + inLibrary + score + + + + Rare-feature-incidence + Less than 1/h. (Source: Beniczky ea 2017, Table 6.) + + hedId + HED_0042226 + + + inLibrary + score + + + + Uncommon-feature-incidence + 1/5 min to 1/h. (Source: Beniczky ea 2017, Table 6.) + + hedId + HED_0042227 + + + inLibrary + score + + + + Occasional-feature-incidence + 1/min to 1/5min. (Source: Beniczky ea 2017, Table 6.) + + hedId + HED_0042228 + + + inLibrary + score + + + + Frequent-feature-incidence + 1/10 s to 1/min. (Source: Beniczky ea 2017, Table 6.) + + hedId + HED_0042229 + + + inLibrary + score + + + + Abundant-feature-incidence + Greater than 1/10 s. (Source: Beniczky ea 2017, Table 6.) + + hedId + HED_0042230 + + + inLibrary + score + + + + + Feature-prevalence + For trains or bursts, estimates of how often features are seen in the recording are scored as prevalence (the percentage of the recording covered by the train/burst). (Source: Beniczky ea 2017, Section 8, Table 6, Table 8.) + + hedId + HED_0042231 + + + inLibrary + score + + + Rare-prevalence + Less than 1 percent. (Source: Beniczky ea 2017, Table 6, Table 8). + + hedId + HED_0042232 + + + inLibrary + score + + + + Occasional-prevalence + 1 to 9 percent. (Source: Beniczky ea 2017, Table 6, Table 8) + + hedId + HED_0042233 + + + inLibrary + score + + + + Frequent-prevalence + 10 to 49 percent. (Source: Beniczky ea 2017, Table 6, Table 8) + + hedId + HED_0042234 + + + inLibrary + score + + + + Abundant-prevalence + 50 to 89 percent. (Source: Beniczky ea 2017, Table 6, Table 8) + + hedId + HED_0042235 + + + inLibrary + score + + + + Continuous-prevalence + Greater than 90 percent. (Source: Beniczky ea 2017, Table 6, Table 8) + + hedId + HED_0042236 + + + inLibrary + score + + + + + + Posterior-dominant-rhythm-property + Posterior dominant rhythm is the most often scored EEG feature in clinical practice. Therefore, there are specific terms that can be chosen for characterizing the PDR. Note that frequency and amplitude can be further described to be symmetrical or asymmetrical. (Source: Beniczky ea 2017, Section 6, Table 4.) + + suggestedTag + Feature-frequency + Feature-amplitude + + + hedId + HED_0042237 + + + inLibrary + score + + + Posterior-dominant-rhythm-amplitude-range + Low: less than 20 microV, Medium: 20 to 70 microVSource, High: more than 70 microV. (Source: Beniczky ea 2017, Table 4.) + + suggestedTag + Low + Medium + High + + + hedId + HED_0042238 + + + inLibrary + score + + + + Posterior-dominant-rhythm-eye-opening-reactivity + Change (disappearance or measurable decrease in amplitude) of a posterior dominant rhythm following eye-opening. Eye closure has the opposite effect. (Source: Beniczky ea 2013, Appendix S2; Beniczky ea 2017, Table 4.) + + suggestedTag + Property-not-possible-to-determine + Left + Right + + + hedId + HED_0042239 + + + inLibrary + score + + + + Posterior-dominant-rhythm-organization + Posterior dominant rhythm organization. When normal could be labeled with suggested tag. (Source: Beniczky ea 2017, Table 4.) + + suggestedTag + Normal + + + hedId + HED_0042240 + + + inLibrary + score + + + Posterior-dominant-rhythm-organization-poorly-organized + Poorly organized. (Source: Beniczky ea 2017, Table 4.) + + hedId + HED_0042241 + + + inLibrary + score + + + + Posterior-dominant-rhythm-organization-disorganized + Disorganized. (Source: Beniczky ea 2017, Table 4.) + + hedId + HED_0042242 + + + inLibrary + score + + + + Posterior-dominant-rhythm-organization-markedly-disorganized + Markedly disorganized. (Source: Beniczky ea 2017, Table 4.) + + hedId + HED_0042243 + + + inLibrary + score + + + + + Posterior-dominant-rhythm-caveat + Caveats for PDR annotation, use suggestedTags to indicate whether there were: no caveats, only open eyes during the recording, sleep-deprived, drowsy or only following hyperventilation. (Source: Beniczky ea 2017, Table 4.) + + suggestedTag + None + Eyes-open + Sleep-deprivation + Drowsy + Hyperventilation + + + hedId + HED_0042244 + + + inLibrary + score + + + + Absence-of-posterior-dominant-rhythm + Reason for absence of PDR. (Source: Beniczky ea 2017, Table 4.) + + suggestedTag + Data-artifact + Asleep + + + hedId + HED_0042245 + + + inLibrary + score + + + Absence-of-posterior-dominant-rhythm-extreme-low-voltage + Source: Beniczky ea 2017, Table 4. + + hedId + HED_0042246 + + + inLibrary + score + + + + Absence-of-posterior-dominant-rhythm-eye-closure-could-not-be-achieved + Source: Beniczky ea 2017, Table 4. + + hedId + HED_0042247 + + + inLibrary + score + + + + Absence-of-posterior-dominant-rhythm-lack-of-compliance + Source: Beniczky ea 2017, Table 4. + + hedId + HED_0042248 + + + inLibrary + score + + + + Absence-of-posterior-dominant-rhythm-other-causes + Source: Beniczky ea 2017, Table 4. + + requireChild + + + hedId + HED_0042249 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042250 + + + inLibrary + score + + + + + + + Episode-property + Episode property pertains to the set of characteristics that collectively depict different aspects of an episode, encompassing its manifestations and phases. + + hedId + HED_0042251 + + + inLibrary + score + + + Seizure-classification + Seizure classification refers to the grouping of seizures based on their clinical features, EEG patterns, and other characteristics. Epileptic seizures are named using the current ILAE seizure classification (Fisher et al., 2017, Beniczky et al., 2017). + + hedId + HED_0042252 + + + inLibrary + score + + + Myoclonic-seizure + Sudden, brief (lower than 100 msec) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal). Myoclonus is less regularly repetitive and less sustained than is clonus. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2; Duration tag from Beniczky ea Table 13.) + + suggestedTag + Duration + + + hedId + HED_0042253 + + + inLibrary + score + + + + Negative-myoclonic-seizure + Source: Beniczky ea 2017, Supplement 1; Duration tag from Beniczky ea Table 13. + + suggestedTag + Duration + + + hedId + HED_0042254 + + + inLibrary + score + + + + Motor-seizure + Involves musculature in any form. The motor event could consist of an increase (positive) or decrease (negative) in muscle contraction to produce a movement. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2; Duration tag from Beniczky ea Table 13.) + + suggestedTag + Duration + + + hedId + HED_0042255 + + + inLibrary + score + + + Clonic-seizure + Jerking, either symmetric or asymmetric, that is regularly repetitive and involves the same muscle groups. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042256 + + + inLibrary + score + + + + Tonic-seizure + A sustained increase in muscle contraction lasting a few seconds to minutes. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042257 + + + inLibrary + score + + + + Atonic-seizure + Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting about 1 to 2 s, involving head, trunk, jaw, or limb musculature. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042258 + + + inLibrary + score + + + + Myoclonic-atonic-seizure + A generalized seizure type with a myoclonic jerk leading to an atonic motor component. This type was previously called myoclonic astatic. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042259 + + + inLibrary + score + + + + Myoclonic-tonic-clonic-seizure + One or a few jerks of limbs bilaterally, followed by a tonic clonic seizure. The initial jerks can be considered to be either a brief period of clonus or myoclonus. Seizures with this characteristic are common in juvenile myoclonic epilepsy. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042260 + + + inLibrary + score + + + + Tonic-clonic-seizure + A sequence consisting of a tonic followed by a clonic phase. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042261 + + + inLibrary + score + + + + Automatism-seizure + A more or less coordinated motor activity usually occurring when cognition is impaired and for which the subject is usually (but not always) amnesic afterward. This often resembles a voluntary movement and may consist of an inappropriate continuation of preictal motor activity. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042262 + + + inLibrary + score + + + + Hyperkinetic-seizure + (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042263 + + + inLibrary + score + + + + Epileptic-spasm + A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not as sustained as a tonic seizure. Limited forms may occur: Grimacing, head nodding, or subtle eye movements. Epileptic spasms frequently occur in clusters. Infantile spasms are the best known form, but spasms can occur at all ages. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042264 + + + inLibrary + score + + + + + Nonmotor-seizure + Focal or generalized seizure types in which motor activity is not prominent. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2; Duration tag from Beniczky ea Table 13.) + + suggestedTag + Duration + + + hedId + HED_0042265 + + + inLibrary + score + + + Behavior-arrest-seizure + Arrest (pause) of activities, freezing, immobilization, as in behavior arrest seizure. A focal behavior arrest seizure shows arrest of behavior as the prominent feature of the entire seizure. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017.) + + hedId + HED_0042266 + + + inLibrary + score + + + + Sensory-seizure + A perceptual experience not caused by appropriate stimuli in the external world. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042267 + + + inLibrary + score + + + + Emotional-seizure + Seizures presenting with an emotion or the appearance of having an emotion as an early prominent feature, such as fear, spontaneous joy or euphoria, laughing (gelastic), or crying (dacrystic). Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042268 + + + inLibrary + score + + + + Cognitive-seizure + Pertaining to thinking and higher cortical functions, such as language, spatial perception, memory, and praxis. The previous term for similar usage as a seizure type was psychic. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042269 + + + inLibrary + score + + + + Autonomic-seizure + A distinct alteration of autonomic nervous system function involving cardiovascular, pupillary, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042270 + + + inLibrary + score + + + + + Absence-seizure + Absence seizures present with a sudden cessation of activity and awareness. Absence seizures tend to occur in younger age groups, have more sudden start and termination, and they usually display less complex automatisms than do focal seizures with impaired awareness, but the distinctions are not absolute. EEG information may be required for accurate classification. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2; Duration tag from Beniczky ea Table 13.) + + suggestedTag + Duration + + + hedId + HED_0042271 + + + inLibrary + score + + + Typical-absence-seizure + A sudden onset, interruption of ongoing activities, a blank stare, possibly a brief upward deviation of the eyes. Usually the patient will be unresponsive when spoken to. Duration is a few seconds to half a minute with very rapid recovery. Although not always available, an EEG would show generalized epileptiform discharges during the event. An absence seizure is by definition a seizure of generalized onset. The word is not synonymous with a blank stare, which also can be encountered with focal onset seizures. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042272 + + + inLibrary + score + + + + Atypical-absence-seizure + An absence seizure with changes in tone that are more pronounced than in typical absence or the onset and/or cessation is not abrupt, often associated with slow, irregular, generalized spike-wave activity. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042273 + + + inLibrary + score + + + + Myoclonic-absence-seizure + A myoclonic absence seizure refers to an absence seizure with rhythmic three-per-second myoclonic movements, causing ratcheting abduction of the upper limbs leading to progressive arm elevation, and associated with three-per-second generalized spike-wave discharges. Duration is typically 10 to 60 s. Impairment of consciousness may not be obvious. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, page 536.) + + hedId + HED_0042274 + + + inLibrary + score + + + + Eyelid-myoclonia-seizure + Jerking of the eyelids at frequencies of at least 3 per second, commonly with upward eye deviation, usually lasting <10 s, often precipitated by eye closure. There may or may not be associated brief loss of awareness. Definition from ILAE 2017 Classification of Seizure Types Expanded Version. (Source: Fisher ea 2017, Table 2.) + + hedId + HED_0042275 + + + inLibrary + score + + + + + + Seizure-semiology + Seizure semiology refers to the clinical signs and sympoms that are observed during a seizure. Semiology is described according to the ILAE Glossary of Descriptive Terminology for Ictal Semiology (Blume et al., 2001). Besides the name, the semiologic feature can also be characterized by the somatotopic modifier, laterality, body part and centricity. Uses Location-property tags. (Source: Beniczky ea 2017, Section 10; Duration tag from Beniczky ea Table 13.) + + suggestedTag + None + Duration + + + hedId + HED_0042276 + + + inLibrary + score + + + Semiology-motor-behavioral-arrest + Interruption of ongoing motor activity or of ongoing behaviors with fixed gaze, without movement of the head or trunk (oro-alimentary and hand automatisms may continue). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042277 + + + inLibrary + score + + + + Semiology-dyscognitive + The term describes events in which (1) disturbance of cognition is the predominant or most apparent feature, and (2a) two or more of the following components are involved, or (2b) involvement of such components remains undetermined. Otherwise, use the more specific term (e.g., mnemonic experiential seizure or hallucinatory experiential seizure). Components of cognition: ++ perception: symbolic conception of sensory information ++ attention: appropriate selection of a principal perception or task ++ emotion: appropriate affective significance of a perception ++ memory: ability to store and retrieve percepts or concepts ++ executive function: anticipation, selection, monitoring of consequences, and initiation of motor activity including praxis, speech. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042278 + + + inLibrary + score + + + + Semiology-elementary-motor + A single type of contraction of a muscle or group of muscles that is usually stereotyped and not decomposable into phases. However, see tonic-clonic, an elementary motor sequence. (Source: Blume ea 2001, 1.1; Beniczky ea 2017, Table 10.) + + hedId + HED_0042279 + + + inLibrary + score + + + Semiology-myoclonic-jerk + Characterized by myoclonus. MYOCLONUS : sudden, brief (lower than 100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042280 + + + inLibrary + score + + + + Semiology-negative-myoclonus + Characterized by negative myoclonus. NEGATIVE MYOCLONUS: interruption of tonic muscular activity for lower than 500 ms without evidence of preceding myoclonia. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042281 + + + inLibrary + score + + + + Semiology-clonic + Myoclonus that is regularly repetitive, involves the same muscle groups, at a frequency of about 2 to 3 c/s, and is prolonged. Synonym: rhythmic myoclonus. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042282 + + + inLibrary + score + + + + Semiology-jacksonian-march + Term indicating spread of clonic movements through contiguous body parts unilaterally. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042283 + + + inLibrary + score + + + + Semiology-epileptic-spasm + A sudden flexion, extension, or mixed extension flexion of predominantly proximal and truncal muscles that is usually more sustained than a myoclonic movement but not so sustained as a tonic seizure (i.e., about 1 s). Limited forms may occur: grimacing, head nodding. Frequent occurrence in clusters. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042284 + + + inLibrary + score + + + + Semiology-tonic + A sustained increase in muscle contraction lasting a few seconds to minutes. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042285 + + + inLibrary + score + + + + Semiology-dystonic + Sustained contractions of both agonist and antagonist muscles producing athetoid or twisting movements, which, when prolonged, may produce abnormal postures. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042286 + + + inLibrary + score + + + + Semiology-postural + Adoption of a posture that may be bilaterally symmetric or asymmetric (as in a fencing posture). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042287 + + + inLibrary + score + + + + Semiology-versive + A sustained, forced conjugate ocular, cephalic, and/or truncal rotation or lateral deviation from the midline. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Body-part + + + hedId + HED_0042288 + + + inLibrary + score + + + + Semiology-tonic-clonic + A sequence consisting of a tonic followed by a clonic phase. Variants such as clonic-tonic-clonic may be seen. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042289 + + + inLibrary + score + + + Semiology-tonic-clonic-without-figure-of-four + Without figure of four: Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042290 + + + inLibrary + score + + + + Semiology-tonic-clonic-with-figure-of-four-extension-left-elbow + With figure of four: Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042291 + + + inLibrary + score + + + + Semiology-tonic-clonic-with-figure-of-four-extension-right-elbow + With figure of four: Asymmetry of limb posture during the tonic phase of a GTC: one arm is rigidly extended at the elbow (often with the fist clenched tightly and flexed at the wrist), whereas the opposite arm is flexed at the elbow. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042292 + + + inLibrary + score + + + + + Semiology-astatic + Loss of erect posture that results from an atonic, myoclonic, or tonic mechanism. Synonym: drop attack. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042293 + + + inLibrary + score + + + + Semiology-atonic + Sudden loss or diminution of muscle tone without apparent preceding myoclonic or tonic event lasting greater or equal to 1 to 2 s, involving head, trunk, jaw, or limb musculature. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042294 + + + inLibrary + score + + + + Semiology-eye-blinking + Source: Beniczky ea 2017, Table 10. + + suggestedTag + Categorical-location-value + + + hedId + HED_0042295 + + + inLibrary + score + + + + Semiology-subtle-motor-phenomena + Source: Beniczky ea 2017, Table 10. + + requireChild + + + suggestedTag + Categorical-location-value + + + hedId + HED_0042296 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042297 + + + inLibrary + score + + + + + Semiology-other-elementary-motor + + requireChild + + + hedId + HED_0042298 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042299 + + + inLibrary + score + + + + + + Semiology-automatisms + A more or less coordinated, repetitive, motor activity usually occurring when cognition is impaired and for which the subject is usually amnesic afterward. This often resembles a voluntary movement and may consist of an inappropriate continuation of ongoing preictal motor activity. (Source: Beniczky ea 2017, Table 10; Fisher ea 2017, Table 2.) + + hedId + HED_0042300 + + + inLibrary + score + + + Semiology-mimetic + Facial expression suggesting an emotional state, often fear. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042301 + + + inLibrary + score + + + + Semiology-oroalimentary + Lip smacking, lip pursing, chewing, licking, tooth grinding, or swallowing. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042302 + + + inLibrary + score + + + + Semiology-dacrystic + Bursts of crying. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042303 + + + inLibrary + score + + + + Semiology-manual + 1. Indicates principally distal components, bilateral or unilateral. 2. Fumbling, tapping, manipulating movements. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042304 + + + inLibrary + score + + + + Semiology-gestural + Semipurposive, asynchronous hand movements. Often unilateral. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042305 + + + inLibrary + score + + + + Semiology-hypermotor + 1. Involves predominantly proximal limb or axial muscles producing irregular sequential ballistic movements, such as pedaling, pelvic thrusting, thrashing, rocking movements. 2. Increase in rate of ongoing movements or inappropriately rapid performance of a movement. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042306 + + + inLibrary + score + + + + Semiology-hypokinetic + A decrease in amplitude and/or rate or arrest of ongoing motor activity. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042307 + + + inLibrary + score + + + + Semiology-gelastic + Bursts of laughter or giggling, usually without an appropriate affective tone. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042308 + + + inLibrary + score + + + + Semiology-other-automatisms + Source: Beniczky ea 2017, Table 10. + + requireChild + + + hedId + HED_0042309 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042310 + + + inLibrary + score + + + + + + Semiology-sensory + A perceptual experience not caused by appropriate stimuli in the external world. Modifies seizure or aura. (Source: Beniczky ea 2017, Table 10; Blume ea 2001, 2.2.) + + hedId + HED_0042311 + + + inLibrary + score + + + Semiology-headache + Headache occurring in close temporal proximity to the seizure or as the sole seizure manifestation. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042312 + + + inLibrary + score + + + + Semiology-visual + Flashing or flickering lights, spots, simple patterns, scotomata, or amaurosis. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042313 + + + inLibrary + score + + + + Semiology-auditory + Buzzing, drumming sounds or single tones. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042314 + + + inLibrary + score + + + + Semiology-olfactory + Source: Beniczky ea 2017, Table 10. + + hedId + HED_0042315 + + + inLibrary + score + + + + Semiology-gustatory + Taste sensations including acidic, bitter, salty, sweet, or metallic. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042316 + + + inLibrary + score + + + + Semiology-epigastric + Abdominal discomfort including nausea, emptiness, tightness, churning, butterflies, malaise, pain, and hunger; sensation may rise to chest or throat. Some phenomena may reflect ictal autonomic dysfunction. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042317 + + + inLibrary + score + + + + Semiology-somatosensory + Tingling, numbness, electric-shock sensation, sense of movement or desire to move. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042318 + + + inLibrary + score + + + + Semiology-autonomic-sensation + Viscerosensitive. A sensation consistent with involvement of the autonomic nervous system, including cardiovascular, gastrointestinal, sudomotor, vasomotor, and thermoregulatory functions. (Thus autonomic aura; cf. autonomic events 3.0/Semiology-autonomic). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5; Blume ea 2001, 2.2.1.8.) + + hedId + HED_0042319 + + + inLibrary + score + + + + Semiology-sensory-other + Source: Beniczky ea 2017, Table 10. + + requireChild + + + hedId + HED_0042320 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042321 + + + inLibrary + score + + + + + + Semiology-experiential + Affective, mnemonic, or composite perceptual phenomena including illusory or composite hallucinatory events; these may appear alone or in combination. Included are feelings of depersonalization. These phenomena have subjective qualities similar to those experienced in life but are recognized by the subject as occurring outside of actual context. (Source: Beniczky ea 2017, Table 10; Blume ea 2001, 2.2.2.) + + hedId + HED_0042322 + + + inLibrary + score + + + Semiology-affective-emotional + Components include fear, depression, joy, and (rarely) anger. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042323 + + + inLibrary + score + + + + Semiology-hallucinatory + Composite perceptions without corresponding external stimuli involving visual, auditory, somatosensory, olfactory, and/or gustatory phenomena. Example: hearing and seeing people talking. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042324 + + + inLibrary + score + + + + Semiology-illusory + An alteration of actual percepts involving the visual, auditory, somatosensory, olfactory, or gustatory systems. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042325 + + + inLibrary + score + + + + Semiology-mnemonic + Components that reflect ictal dysmnesia such as feelings of familiarity (deja-vu) and unfamiliarity (jamais-vu). Use suggested tags to indicate Familiar (deja-vu) or Unfamiliar (jamais-vu). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Familiar + Unfamiliar + + + hedId + HED_0042326 + + + inLibrary + score + + + + Semiology-experiential-other + Source: Beniczky ea 2017, Table 10. + + requireChild + + + hedId + HED_0042327 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042328 + + + inLibrary + score + + + + + + Semiology-language + Source: Beniczky ea 2017, Table 10. + + hedId + HED_0042329 + + + inLibrary + score + + + Semiology-vocalization + Single or repetitive utterances consisting of sounds such as grunts or shrieks. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042330 + + + inLibrary + score + + + + Semiology-verbalization + Single or repetitive utterances consisting of words, phrases, or brief sentences. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042331 + + + inLibrary + score + + + + Semiology-dysphasia + Partially impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, paraphasic errors, or a combination of these. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042332 + + + inLibrary + score + + + + Semiology-aphasia + Fully impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, paraphasic errors, or a combination of these. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042333 + + + inLibrary + score + + + + Semiology-language-other + Source: Beniczky ea 2017, Table 10. + + requireChild + + + hedId + HED_0042334 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042335 + + + inLibrary + score + + + + + + Semiology-autonomic + An objectively documented and distinct alteration of autonomic nervous system function involving cardiovascular, pupillary, gastrointestinal, sudomotor, vasomotor, and thermoregularity functions (cf. Semiology-autonomic-sensation). (Source: Beniczky ea 2017, Table 10; Blume ea 2001, 3.2.) + + hedId + HED_0042336 + + + inLibrary + score + + + Semiology-pupillary + Mydriasis, miosis (either bilateral or unilateral). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042337 + + + inLibrary + score + + + + Semiology-hypersalivation + Increase in production of saliva leading to uncontrollable drooling. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042338 + + + inLibrary + score + + + + Semiology-respiratory-apnoeic + Subjective shortness of breath, hyperventilation, stridor, coughing, choking, apnea, oxygen desaturation, neurogenic pulmonary edema. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042339 + + + inLibrary + score + + + + Semiology-cardiovascular + Modifications of heart rate (tachycardia, bradycardia), cardiac arrhythmias (such as sinus arrhythmia, sinus arrest, supraventricular tachycardia, atrial premature depolarizations, ventricular premature depolarizations, atrio-ventricular block, bundle branch block, atrioventricular nodal escape rhythm, asystole). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042340 + + + inLibrary + score + + + + Semiology-gastrointestinal + Nausea, eructation, vomiting, retching, abdominal sensations, abdominal pain, flatulence, spitting, diarrhea. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042341 + + + inLibrary + score + + + + Semiology-urinary-incontinence + Urinary urge (intense urinary urge at the beginning of seizures), urinary incontinence, ictal urination (rare symptom of partial seizures without loss of consciousness). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042342 + + + inLibrary + score + + + + Semiology-genital + Sexual auras (erotic thoughts and feelings, sexual arousal and orgasm). Genital auras (unpleasant, sometimes painful, frightening or emotionally neutral somatosensory sensations in the genitals that can be accompanied by ictal orgasm). Sexual automatisms (hypermotor movements consisting of writhing, thrusting, rhythmic movements of the pelvis, arms and legs, sometimes associated with picking and rhythmic manipulation of the groin or genitalia, exhibitionism and masturbation). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042343 + + + inLibrary + score + + + + Semiology-vasomotor + Flushing or pallor (may be accompanied by feelings of warmth, cold and pain). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042344 + + + inLibrary + score + + + + Semiology-sudomotor + Sweating and piloerection (may be accompanied by feelings of warmth, cold and pain). (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042345 + + + inLibrary + score + + + + Semiology-thermoregulatory + Hyperthermia, fever. (Source: Beniczky ea 2017, Table 10; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042346 + + + inLibrary + score + + + + Semiology-autonomic-other + + requireChild + + + hedId + HED_0042347 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042348 + + + inLibrary + score + + + + + + Semiology-manifestation-other + + requireChild + + + hedId + HED_0042349 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042350 + + + inLibrary + score + + + + + + Postictal-semiology + A transient clinical abnormality of central nervous system function that appears or becomes accentuated when clinical signs of the ictus have ended. (Source: Blume ea 2001; Beniczky ea 2017, Table 11; Duration tag from Beniczky ea Table 13.) + + suggestedTag + None + Duration + + + hedId + HED_0042351 + + + inLibrary + score + + + Postictal-unconscious + Unawareness and unresponsiveness. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042352 + + + inLibrary + score + + + + Postictal-quick-recovery-of-consciousness + Quick recovery of awareness and responsiveness. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042353 + + + inLibrary + score + + + + Postictal-aphasia-or-dysphasia + Impaired communication involving language without dysfunction of relevant primary motor or sensory pathways, manifested as impaired comprehension, anomia, parahasic errors or a combination of these. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042354 + + + inLibrary + score + + + + Postictal-behavioral-change + Occurring immediately after a seizure. Including psychosis, hypomanina, obsessive-compulsive behavior. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042355 + + + inLibrary + score + + + + Postictal-hemianopia + Postictal visual loss in a a hemi field. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042356 + + + inLibrary + score + + + + Postictal-impaired-cognition + Decreased Cognitive performance involving one or more of perception, attention, emotion, memory, execution, praxis, speech. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042357 + + + inLibrary + score + + + + Postictal-dysphoria + Depression, irritability, euphoric mood, fear, anxiety. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042358 + + + inLibrary + score + + + + Postictal-headache + Headache with features of tension-type or migraine headache that develops within 3 h following the seizure and resolves within 72 h after seizure. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042359 + + + inLibrary + score + + + + Postictal-nose-wiping + Noes-wiping usually within 60 sec of seizure offset, usually with the hand ipsilateral to the seizure onset. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + + + hedId + HED_0042360 + + + inLibrary + score + + + + Postictal-anterograde-amnesia + Impaired ability to remember new material. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042361 + + + inLibrary + score + + + + Postictal-retrograde-amnesia + Impaired ability to recall previously remember material. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042362 + + + inLibrary + score + + + + Postictal-paresis + Todds palsy. Any unilateral postictal dysfunction relating to motor, language, sensory and/or integrative functions. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + suggestedTag + Categorical-location-value + Body-part + + + hedId + HED_0042363 + + + inLibrary + score + + + + Postictal-sleep + Invincible need to sleep after a seizure. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042364 + + + inLibrary + score + + + + Postictal-unilateral-myoclonic-jerks + Unilateral myoclonic jerks. Myoclonus: sudden, brief (<100 ms) involuntary single or multiple contraction(s) of muscles(s) or muscle groups of variable topography (axial, proximal limb, distal). (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + hedId + HED_0042365 + + + inLibrary + score + + + + Postictal-other-unilateral-motor-phenomena + Unilateral motor phenomena, other then specified above, occurring in the postictal phase. (Source: Beniczky ea 2017, Table 11; Beniczky ea 2013, Appendix S5.) + + requireChild + + + hedId + HED_0042366 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042367 + + + inLibrary + score + + + + + + Episode-time-context-property + Additional clinically relevant features related to episodes can be scored under timing and context. If needed, episode duration can be tagged with suggested tag. (Source: Beniczky ea 2017, Section 10.) + + hedId + HED_0042368 + + + inLibrary + score + + + Episode-consciousness-affected + Source: Beniczky ea 2017, Table 13. + + suggestedTag + False + Some + True + Property-not-possible-to-determine + + + hedId + HED_0042369 + + + inLibrary + score + + + + Episode-awareness + False: the patient is not aware of the episode. True: the patient is aware of the episode. (Source: Beniczky ea 2017, Table 13.) + + suggestedTag + True + False + + + hedId + HED_0042370 + + + inLibrary + score + + + + Episode-event-count + Number of stereotypical episodes during the recording. (Source: Beniczky ea 2017, Table 13.) + + requireChild + + + suggestedTag + Property-not-possible-to-determine + + + hedId + HED_0042371 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042372 + + + inLibrary + score + + + + + Status-epilepticus + Episode with duration >30 min but not precisely determined (status epilepticus). (Source: Beniczky ea 2017, Table 13.) + + hedId + HED_0042373 + + + inLibrary + score + + + + Episode-prodrome + Prodrome is a preictal phenomenon, and it is defined as a subjective or objective clinical alteration (e.g., ill-localized sensation or agitation) that heralds the onset of an epileptic seizure but does not form part of it (Blume ea 2001). Therefore, prodrome should be distinguished from aura (which is an ictal phenomenon). If prodrome present/true + free text. (Source: Blume ea 2001; Beniczky ea 2017, Table 13.) + + suggestedTag + True + False + + + hedId + HED_0042374 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042375 + + + inLibrary + score + + + + + Initial-ictal-phase + + suggestedTag + Asleep + Awake + + + hedId + HED_0042376 + + + inLibrary + score + + + + Subsequent-ictal-phase + + hedId + HED_0042377 + + + inLibrary + score + + + + Post-ictal-phase + + hedId + HED_0042378 + + + inLibrary + score + + + + Episode-tongue-biting + Beniczky ea 2017, Table 13. + + suggestedTag + True + False + + + hedId + HED_0042379 + + + inLibrary + score + + + + + + Other-feature-property + + requireChild + + + hedId + HED_0042380 + + + inLibrary + score + + + Artifact-significance-to-recording + It is important to score the significance of the described artifacts: recording is not interpretable, recording of reduced diagnostic value, does not interfere with the interpretation of the recording. (Source: Beniczky ea 2017, Section 12) + + hedId + HED_0042381 + + + inLibrary + score + + + Recording-not-interpretable-due-to-artifact + + hedId + HED_0042382 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042383 + + + inLibrary + score + + + + + Recording-of-reduced-diagnostic-value-due-to-artifact + + hedId + HED_0042384 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042385 + + + inLibrary + score + + + + + Artifact-does-not-interfere-recording + + hedId + HED_0042386 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042387 + + + inLibrary + score + + + + + + Feature-significance-to-recording + Significance of feature. When normal/abnormal could be labeled with with suggested tags. + + suggestedTag + Normal + Abnormal + Property-not-possible-to-determine + + + hedId + HED_0042388 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042389 + + + inLibrary + score + + + + + Feature-frequency + Value in Hz (number) typed in. + + requireChild + + + suggestedTag + Symmetrical + Asymmetrical + + + hedId + HED_0042390 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0042391 + + + inLibrary + score + + + + + Feature-amplitude + Value in microvolts (number) typed in, e.g. (Feature-amplitude/number uv) + + requireChild + + + suggestedTag + Symmetrical + Asymmetrical + + + hedId + HED_0042392 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + electricPotentialUnits + + + hedId + HED_0042393 + + + inLibrary + score + + + + + Feature-stopped-by + + requireChild + + + hedId + HED_0042394 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042395 + + + inLibrary + score + + + + + Property-not-possible-to-determine + Not possible to determine. + + hedId + HED_0042396 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042397 + + + inLibrary + score + + + + + + + Interictal-activity + EEG pattern / transient that is distinguished from the background activity, considered abnormal, but is not recorded during ictal period (seizure) or postictal period; the presence of interictal activity does not necessarily imply that the patient has epilepsy. (Source: Beniczky ea 2013, Appendix S1; Beniczky ea 2017, Table 5.) + + hedId + HED_0042398 + + + inLibrary + score + + + Epileptiform-interictal-activity + Transients distinguishable from background activity, with characteristic spiky morphology, typically, but neither exclusively, nor invariably found in interictal EEGs of people with epilepsy. (Source: Beniczky ea 2013, Appendix S4; Morphologies from Beniczky ea 2017, Table 5; Suggested tags from Beniczky ea 2017, Section 8.) + + suggestedTag + Spike + Spike-and-slow-wave + Runs-of-rapid-spikes + Polyspikes + Polyspike-and-slow-wave + Sharp-wave + Sharp-and-slow-wave + Slow-sharp-wave + High-frequency-oscillation + Hypsarrhythmia-classic + Hypsarrhythmia-modified + Categorical-location-value + Sensor-list + Feature-propagation + Multifocal-feature + Appearance-mode + Discharge-pattern + Feature-incidence + + + hedId + HED_0042399 + + + inLibrary + score + + + + Abnormal-interictal-rhythmic-activity + Activity of frequency lower than alpha, that clearly exceeds the amount considered physiologically normal for patient age and state of alertness. (Source: Beniczky ea 2013, Appendix S4; Morphologies from Beniczky ea 2017, Table 5; Suggested tags from Beniczky ea 2017, Section 8.) + + suggestedTag + Rhythmic-property + Polymorphic-delta-activity + Frontal-intermittent-rhythmic-delta-activity + Occipital-intermittent-rhythmic-delta-activity + Temporal-intermittent-rhythmic-delta-activity + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + Feature-incidence + + + hedId + HED_0042400 + + + inLibrary + score + + + + Interictal-special-patterns + (Source: Beniczky ea 2017, Table 5.) + + hedId + HED_0042401 + + + inLibrary + score + + + Interictal-periodic-discharges + Periodic discharge not further specified (PDs). (Source: Beniczky ea 2017, Table 5.) + + suggestedTag + RPP-morphology + Categorical-location-value + Sensor-list + RPP-time-related-feature + + + hedId + HED_0042402 + + + inLibrary + score + + + Generalized-periodic-discharges + GPDs. The term generalized refers to any bilateral, bisynchronous and symmetric pattern, even if it has a restricted field (e.g. bifrontal). (Source: Beniczky ea 2017, Table 5; Hirsch ea 2013.) + + hedId + HED_0042403 + + + inLibrary + score + + + + Lateralized-periodic-discharges + LPDs. Lateralized includes unilateral and bilateral synchronous but asymmetric; includes focal, regional and hemispheric patterns. (Source: Beniczky ea 2017, Table 5; Hirsch ea 2013.) + + hedId + HED_0042404 + + + inLibrary + score + + + + Bilateral-independent-periodic-discharges + BIPDs. Bilateral Independent refers to the presence of 2 independent (asynchronous) lateralized patterns, one in each hemisphere. (Source: Beniczky ea 2017, Table 5; Hirsch ea 2013.) + + hedId + HED_0042405 + + + inLibrary + score + + + + Multifocal-periodic-discharges + MfPDs. Multifocal refers to the presence of at least three independent lateralized patterns with at least one in each hemisphere. (Source: Beniczky ea 2017, Table 5; Hirsch ea 2013.) + + hedId + HED_0042406 + + + inLibrary + score + + + + + Extreme-delta-brush + (Source: Beniczky ea 2017, Table 5.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042407 + + + inLibrary + score + + + + + + Physiologic-pattern + EEG graphoelements or rhythms that are considered normal. They only should be scored if the physician considers that they have a specific clinical significance for the recording. (Source: Beniczky ea 2013, Appendix S1; Beniczky ea 2017, Table 14.) + + hedId + HED_0042408 + + + inLibrary + score + + + Rhythmic-activity-pattern + Rhythmic activity. (Source: Beniczky ea 2017, Table 14.) + + suggestedTag + Rhythmic-property + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042409 + + + inLibrary + score + + + + Slow-alpha-variant-rhythm + Characteristic rhythms mostly at 4-5 Hz, recorded most prominently over the posterior regions of the head. The signals generally alternate or are intermixed with the alpha rhythm to which they are often harmonically related. Amplitude varies but is frequently close to 50 micro V. Blocked or attenuated by attention, especially visual, and mental effort. Comment: slow alpha variant rhythms should be distinguished from posterior slow waves characteristic of children and adolescents and occasionally seen in young adults. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042410 + + + inLibrary + score + + + + Fast-alpha-variant-rhythm + Characteristic rhythm at 14-20 Hz, detected most prominently over the posterior regions of the head. May alternate or be intermixed with alpha rhythm. Blocked or attenuated by attention, especially visual, and mental effort. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Appearance-mode + Discharge-pattern + + + hedId + HED_0042411 + + + inLibrary + score + + + + Lambda-wave + Diphasic sharp transient occurring over occipital regions of the head of waking subjects during visual exploration. The main component is positive relative to other areas. Time-locked to saccadic eye movement. Amplitude varies but is generally below 50 microV. (Source: Beniczky ea 2013; Appendix S6, Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042412 + + + inLibrary + score + + + + Posterior-slow-waves-youth + Waves in the delta and theta range, of variable form, lasting 0.35 to 0.5 s or longer without any consistent periodicity, found in the range of 6-12 years (occasionally seen in young adults). Alpha waves are almost always intermingled or superimposed. Reactive similar to alpha activity. (Source: Beniczky ea 2013; Appendix S6, Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042413 + + + inLibrary + score + + + + Diffuse-slowing-hyperventilation + Bilateral, diffuse slowing of brain signals during hyperventilation. Recorded in 70 percent of normal children (3-5 years) and less then 10 percent of adults. Slowing usually appears in the posterior regions and spreads forward in younger age groups, whereas slowing tends to appear in the frontal regions and spreads backward in the older age group. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042414 + + + inLibrary + score + + + + Photic-driving + Physiologic response consisting of rhythmic activity elicited over the posterior regions of the head by repetitive photic stimulation at frequencies of about 5-30 Hz. Comments: term should be limited to activity time-locked to the stimulus and of frequency identical or harmonically related to the stimulus frequency. Photic driving should be distinguished from the visual evoked potentials elicited by isolated flashes of light or flashes repeated at very low frequency. (Source: Beniczky ea 2013; Appendix S6, Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042415 + + + inLibrary + score + + + + Photomyogenic-response + A response to intermittent photic stimulation characterized by the appearance in the record of brief, repetitive muscular artifacts (spikes) over the anterior regions of the head. These often increase gradually in amplitude as stimuli are continued and cease promptly when the stimulus is withdrawn. Comment: this response is frequently associated with flutter of the eyelids and vertical oscillations of the eyeballs and sometimes with discrete jerking mostly involving the musculature of the face and head. (Preferred to synonym: photo-myoclonic response). (Source: Beniczky ea 2013; Appendix S6, Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042416 + + + inLibrary + score + + + + Arousal-pattern + Arousal pattern in children. Prolonged, marked high voltage 4-6/s activity in all leads with some intermixed slower frequencies. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042417 + + + inLibrary + score + + + + Frontal-arousal-rhythm + Prolonged (up to 20s) rhythmical sharp or spiky activity over the frontal areas (maximum over the frontal midline) seen at arousal from sleep in children with minimal cerebral dysfunction. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Appearance-mode + Discharge-pattern + + + hedId + HED_0042418 + + + inLibrary + score + + + + Other-physiologic-pattern + + requireChild + + + hedId + HED_0042419 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042420 + + + inLibrary + score + + + + + + Polygraphic-channel-feature + Changes observed in polygraphic channels can be scored: EOG, Respiration, ECG, EMG, other polygraphic channel (+ free text), and their significance logged (normal, abnormal, no definite abnormality). (Source: Beniczky ea 2017, Section 13.) + + hedId + HED_0042421 + + + inLibrary + score + + + EOG-channel-feature + Electrooculogram (EOG) channel features. (Source: Beniczky ea 2017, Section 13.) + + suggestedTag + Feature-significance-to-recording + + + hedId + HED_0042422 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042423 + + + inLibrary + score + + + + + Respiration-channel-feature + Findings in respiration sensors. (Source: Beniczky ea 2017, Section 13, Table 16.) + + suggestedTag + Feature-significance-to-recording + + + hedId + HED_0042424 + + + inLibrary + score + + + Oxygen-saturation + Percentage. (Source: Beniczky ea 2013, Table 9; Beniczky ea 2017, Table 16.) + + requireChild + + + hedId + HED_0042425 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042426 + + + inLibrary + score + + + + + Apnea + Temporary cessation of breathing (Source: Wikipedia). Duration (range in seconds). (Source: Beniczky ea 2013, Table 9.) + + hedId + HED_0042427 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042428 + + + inLibrary + score + + + + + Hypopnea + Overly shallow breathing or an abnormally low respiratory rate. Duration (range in seconds). (Source: Wikipedia; Beniczky ea 2013, Table 9.) + + hedId + HED_0042429 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042430 + + + inLibrary + score + + + + + Apnea-hypopnea-index + Events/hour as calculated by dividing the number of apnoea and hypopnoea events by the number of hours of sleep. (Source: Wikipedia; Beniczky ea 2013, Table 9.) + + suggestedTag + Frequency + + + hedId + HED_0042431 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042432 + + + inLibrary + score + + + + + Periodic-respiration + Three or more episodes of central apnea lasting at least 4 seconds, separated by no more than 30 seconds of normal breathing. (Source:Wikipedia, Source: Beniczky ea 2017, Table 16 + + hedId + HED_0042433 + + + inLibrary + score + + + # + Free text.(Source: Beniczky ea 2017, Table 16.) + + takesValue + + + valueClass + textClass + + + hedId + HED_0042434 + + + inLibrary + score + + + + + Tachypnea + Numerical value for cycles / minute. (Source: Beniczky ea 2017, Table 16.) + + suggestedTag + Frequency + + + hedId + HED_0042435 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0042436 + + + inLibrary + score + + + + + Other-respiration-feature + Source: Beniczky ea 2017, Table 16 + + requireChild + + + hedId + HED_0042437 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042438 + + + inLibrary + score + + + + + + ECG-channel-feature + Findings in Electrocardiogram recordings. (Source: Beniczky ea 2017, Section 13, Table 16.) + + suggestedTag + Feature-significance-to-recording + + + hedId + HED_0042439 + + + inLibrary + score + + + ECG-QT-period + The time from the start of the Q wave to the end of the T wave (Source: Wikipedia; Beniczky ea 2013, Table 9; Beniczky ea 2017, Table 16.) + + requireChild + + + hedId + HED_0042440 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0042441 + + + inLibrary + score + + + + + ECG-normal-rhythm + Normal rhythm. (Source: Beniczky ea 2017, Table 16.) + + suggestedTag + Frequency + + + hedId + HED_0042442 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042443 + + + inLibrary + score + + + + + ECG-arrhythmia + Free text annotating characteristics of arrythymia. (Source: Beniczky ea 2017, Table 16.) + + hedId + HED_0042444 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042445 + + + inLibrary + score + + + + + ECG-asystolia + Absence of ventricular contractions in the context of a lethal heart arrhythmia. Duration in seconds of the absence. (Source: Wikipedia; Beniczky ea 2013, Table 9.) + + hedId + HED_0042446 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0042447 + + + inLibrary + score + + + + + ECG-bradycardia + A resting heart rate under 60 beats per minute. Numerical value for frequency in beats/minute. (Source: Wikipedia; Beniczky ea 2017, Table 16; Beniczky ea 2013, Table 9.) + + suggestedTag + Frequency + + + hedId + HED_0042448 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042449 + + + inLibrary + score + + + + + ECG-extrasystole + A heart rhythm disorder corresponding to a premature contraction of one of the chambers of the heart. (Source: Wikipedia; Beniczky ea 2017, Table 16.) + + hedId + HED_0042450 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042451 + + + inLibrary + score + + + + + ECG-ventricular-premature-depolarization + A premature ventricular contraction (PVC) is a common event where the heartbeat is initiated by Purkinje fibers in the ventricles rather than by the sinoatrial node. (Source: Wikipedia; Beniczky ea 2017, Table 16.) + + hedId + HED_0042452 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042453 + + + inLibrary + score + + + + + ECG-tachycardia + A resting heart rate over 100 beats per minute. Numerical value for frequency in beats/minute. (Source: Wikipedia, Source: Beniczky ea 2017, Table 16; Beniczky ea 2013, Table 9.) + + suggestedTag + Frequency + + + hedId + HED_0042454 + + + inLibrary + score + + + # + + takesValue + + + valueClass + textClass + + + hedId + HED_0042455 + + + inLibrary + score + + + + + Other-ECG-feature + Source: Beniczky ea 2017, Table 16. + + requireChild + + + hedId + HED_0042456 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042457 + + + inLibrary + score + + + + + + EMG-channel-feature + Findings in Electromyography recordings (Source: Beniczky ea 2017, Section 13, Table 16.). Suggested tags can be used to note the side of the muscle (Left or Right). The order of activation may be indicated using Temporal-relation: (Left, (Before,Right)). + + suggestedTag + Feature-significance-to-recording + Symmetrical + Left + Right + + + hedId + HED_0042458 + + + inLibrary + score + + + EMG-muscle-name + Source: Beniczky ea 2017, Table 16. + + requireChild + + + hedId + HED_0042459 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042460 + + + inLibrary + score + + + + + Myoclonus + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042461 + + + inLibrary + score + + + Negative-myoclonus + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042462 + + + inLibrary + score + + + + Myoclonus-rhythmic + Numerical value for frequency. (Source: Beniczky ea 2017, Table 16.) + + hedId + HED_0042463 + + + inLibrary + score + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0042464 + + + inLibrary + score + + + + + Myoclonus-arrhythmic + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042465 + + + inLibrary + score + + + + Myoclonus-synchronous + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042466 + + + inLibrary + score + + + + Myoclonus-asynchronous + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042467 + + + inLibrary + score + + + + + PLMS + Periodic limb movements in sleep. (Source: Beniczky ea 2017, Table 16.) + + hedId + HED_0042468 + + + inLibrary + score + + + + Spasm + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042469 + + + inLibrary + score + + + + Tonic-contraction + Source: Beniczky ea 2017, Table 16. + + hedId + HED_0042470 + + + inLibrary + score + + + + Other-EMG-features + Source: Beniczky ea 2017, Table 16. + + requireChild + + + hedId + HED_0042471 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042472 + + + inLibrary + score + + + + + + Other-polygraphic-channel-feature + Add the name and type of the polygraphic channel as well as the feature in the description. (Source: Beniczky ea 2017, Section 13.) + + requireChild + + + hedId + HED_0042473 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042474 + + + inLibrary + score + + + + + + Sleep-and-drowsiness + The features of the ongoing activity during sleep are scored here. If abnormal graphoelements appear, disappear or change their morphology during sleep, that is not scored here but at the entry corresponding to that graphoelement (as a modulator). (Source: Beniczky ea 2013. Appendix S1.) + + hedId + HED_0042475 + + + inLibrary + score + + + Sleep-architecture + For longer recordings. Only to be scored if whole-night sleep is part of the recording. It is a global descriptor of the structure and pattern of sleep: estimation of the amount of time spent in REM and NREM sleep, sleep duration, NREM-REM cycle. (Source: Beniczky ea 2013, Appendix S3.) + + suggestedTag + Property-not-possible-to-determine + + + hedId + HED_0042476 + + + inLibrary + score + + + Normal-sleep-architecture + Recording containing sleep-patterns that are considered normal for the attained sleep stages and for the age. (Source: Benizcky ea 2013, Appendix S3.) + + hedId + HED_0042477 + + + inLibrary + score + + + + Abnormal-sleep-architecture + Absence or consistently marked amplitude asymmetry (>50%) of a normal sleep graphoelement. (Source: Benizcky ea 2013, Appendix S3.) + + hedId + HED_0042478 + + + inLibrary + score + + + + + Sleep-stage-reached + For normal sleep patterns the sleep stages reached during the recording can be specified. (Source: Beniczky ea 2017, Section 7.) + + requireChild + + + suggestedTag + Property-not-possible-to-determine + Feature-significance-to-recording + + + hedId + HED_0042479 + + + inLibrary + score + + + Sleep-stage-N1 + Sleep stage 1. (Source: Beniczky ea 2017, Section 7.) + + hedId + HED_0042480 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042481 + + + inLibrary + score + + + + + Sleep-stage-N2 + Sleep stage 2. (Source: Beniczky ea 2017, Section 7.) + + hedId + HED_0042482 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042483 + + + inLibrary + score + + + + + Sleep-stage-N3 + Sleep stage 3. (Source: Beniczky ea 2017, Section 7.) + + hedId + HED_0042484 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042485 + + + inLibrary + score + + + + + Sleep-stage-REM + Rapid eye movement. (Source: Beniczky ea 2017, Section 7.) + + hedId + HED_0042486 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042487 + + + inLibrary + score + + + + + + Sleep-spindles + Burst at 11-15 Hz but mostly at 12-14 Hz generally diffuse but of higher voltage over the central regions of the head, occurring during sleep. Amplitude varies but is mostly below 50 microV in the adult. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042488 + + + inLibrary + score + + + + Vertex-wave + Sharp potential, maximal at the vertex, negative relative to other areas, apparently occurring spontaneously during sleep or in response to a sensory stimulus during sleep or wakefulness. May be single or repetitive. Amplitude varies but rarely exceeds 250 microV. Abbreviation: V wave. Synonym: vertex sharp wave. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042489 + + + inLibrary + score + + + + K-complex + A burst of somewhat variable appearance, consisting most commonly of a high voltage negative slow wave followed by a smaller positive slow wave frequently associated with a sleep spindle. Duration greater than 0.5 s. Amplitude is generally maximal in the frontal vertex. K complexes occur during nonREM sleep, apparently spontaneously, or in response to sudden sensory / auditory stimuli, and are not specific for any individual sensory modality. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042490 + + + inLibrary + score + + + + Saw-tooth-waves + Vertex negative 2-5 Hz waves occurring in series during REM sleep. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042491 + + + inLibrary + score + + + + POSTS + Positive occipital sharp transients of sleep. Sharp transient maximal over the occipital regions, positive relative to other areas, apparently occurring spontaneously during sleep. May be single or repetitive. Amplitude varies but is generally below 50 microV. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042492 + + + inLibrary + score + + + + Hypnagogic-hypersynchrony + Hypnagogic/hypnopompic hypersynchrony in children. Bursts of bilateral, synchronous delta or theta activity of large amplitude, occasionally with superimposed faster components, occurring during falling asleep or during awakening, in children. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + suggestedTag + Feature-significance-to-recording + Categorical-location-value + Sensor-list + Asymmetrical + Symmetrical + + + hedId + HED_0042493 + + + inLibrary + score + + + + Non-reactive-sleep + EEG activity consisting of normal sleep graphoelements, but which cannot be interrupted by external stimuli/ the patient cannot be wakened. (Source: Beniczky ea 2013, Appendix S3; Beniczky ea 2017, Section 7.) + + hedId + HED_0042494 + + + inLibrary + score + + + + + Uncertain-significant-pattern + EEG graphoelements or rhythms that resemble abnormal patterns but that are not necessarily associated with a pathology, and the physician does not consider them abnormal in the context of the scored recording (like normal variants and patterns). (Source: Beniczky ea 2013, Appendix S1; Beniczky ea 2017, Table 14.) + + hedId + HED_0042495 + + + inLibrary + score + + + Sharp-transient-pattern + Sharp transient. (Source: Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042496 + + + inLibrary + score + + + + Wicket-spikes + Spike-like monophasic negative single waves or trains of waves occurring over the temporal regions during drowsiness that have an arcuate or mu-like appearance. These are mainly seen in older individuals and represent a benign variant that is of little clinical significance. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + hedId + HED_0042497 + + + inLibrary + score + + + + Small-sharp-spikes + Benign Epileptiform Transients of Sleep (BETS). Small Sharp Spikes (SSS) of very short duration and low amplitude, often followed by a small theta wave, occurring in the temporal regions during drowsiness and light sleep. They occur on one or both sides (often asynchronously). The main negative and positive components are of about equally spiky character. Rarely seen in children, they are seen most often in adults and the elderly. Two thirds of the patients have a history of epileptic seizures. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042498 + + + inLibrary + score + + + + Fourteen-six-Hz-positive-burst + Burst of arch-shaped waves at 13-17 Hz and/or 5-7-Hz but most commonly at 14 and/or 6 Hz seen generally over the posterior temporal and adjacent areas of one or both sides of the head during sleep. The sharp peaks of its component waves are positive with respect to other regions. Amplitude varies but is generally below 75 micro V. Comments: (1) best demonstrated by referential recording using contralateral earlobe or other remote, reference electrodes. (2) This pattern has no established clinical significance. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042499 + + + inLibrary + score + + + + Six-Hz-spike-slow-wave + Spike and slow wave complexes at 4-7 Hz, but mostly at 6 Hz occurring generally in brief bursts bilaterally and synchronously, symmetrically or asymmetrically, and either confined to or of larger amplitude over the posterior or anterior regions of the head. The spike has a strong positive component. Amplitude varies but is generally smaller than that of spike-and slow-wave complexes repeating at slower rates. Comment: this pattern should be distinguished from epileptiform discharges. Synonym: wave and spike phantom. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042500 + + + inLibrary + score + + + + Rudimentary-spike-wave-complex + Synonym: pseudo petit mal discharge. Paroxysmal discharge that consists of generalized or nearly generalized high voltage 3 to 4/sec waves with poorly developed spike in the positive trough between the slow waves, occurring in drowsiness only. It is found only in infancy and early childhood when marked hypnagogic rhythmical theta activity is paramount in the drowsy state. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042501 + + + inLibrary + score + + + + Slow-fused-transient + A posterior slow-wave preceded by a sharp-contoured potential that blends together with the ensuing slow wave, in children. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042502 + + + inLibrary + score + + + + Needle-like-occipital-spikes-blind + Spike discharges of a particularly fast and needle-like character develop over the occipital region in most congenitally blind children. Completely disappear during childhood or adolescence. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042503 + + + inLibrary + score + + + + Subclinical-rhythmic-EEG-discharge-adults + Subclinical Rhythmic EEG Discharge of Adults (SERDA). A rhythmic pattern seen in adults, mainly in the waking state or drowsiness. It consists of a mixture of frequencies, often predominant in the theta range. The onset may be fairly abrupt with widespread sharp rhythmical theta and occasionally with delta activity. As to the spatial distribution, a maximum of this discharge is usually found over the centroparietal region and especially over the vertex. It may resemble a seizure discharge but is not accompanied by any clinical signs or symptoms. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042504 + + + inLibrary + score + + + + Rhythmic-temporal-theta-burst-drowsiness + Rhythmic temporal theta burst of drowsiness (RTTD). Characteristic burst of 4-7 Hz waves frequently notched by faster waves, occurring over the temporal regions of the head during drowsiness. Synonym: psychomotor variant pattern. Comment: this is a pattern of drowsiness that is of no clinical significance. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + hedId + HED_0042505 + + + inLibrary + score + + + + Ciganek-rhythm + Ciganek rhythm (midline central theta) (Source: Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042506 + + + inLibrary + score + + + + Temporal-slowing-elderly + Focal theta and/or delta activity over the temporal regions, especially the left, in persons over the age of 60. Amplitudes are low/similar to the background activity. Comment: focal temporal theta was found in 20 percent of people between the ages of 40-59 years, and 40 percent of people between 60 and 79 years. One third of people older than 60 years had focal temporal delta activity. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042507 + + + inLibrary + score + + + + Breach-rhythm + Rhythmical activity recorded over cranial bone defects. Usually it is in the 6 to 11/sec range and does not respond to movements. (Source: Beniczky ea 2013, Appendix S6; Beniczky ea 2017, Table 14.) + + suggestedTag + Categorical-location-value + Sensor-list + Appearance-mode + Discharge-pattern + + + hedId + HED_0042508 + + + inLibrary + score + + + + Other-uncertain-significant-pattern + + requireChild + + + hedId + HED_0042509 + + + inLibrary + score + + + # + Free text. + + takesValue + + + valueClass + textClass + + + hedId + HED_0042510 + + + inLibrary + score + + + + + + Event + Something that happens at a given time and (typically) place. Elements of this tag subtree designate the general category in which an event falls. + + suggestedTag + Task-property + + + hedId + HED_0012001 + + + Sensory-event + Something perceivable by the participant. An event meant to be an experimental stimulus should include the tag Task-property/Task-event-role/Experimental-stimulus. + + suggestedTag + Task-event-role + Sensory-presentation + + + hedId + HED_0012002 + + + + Agent-action + Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant. + + suggestedTag + Task-event-role + Agent + + + hedId + HED_0012003 + + + + Data-feature + An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record. + + suggestedTag + Data-property + + + hedId + HED_0012004 + + + + Experiment-control + An event pertaining to the physical control of the experiment during its operation. + + hedId + HED_0012005 + + + + Experiment-procedure + An event indicating an experimental procedure, as in performing a saliva swab during the experiment or administering a survey. + + hedId + HED_0012006 + + + + Experiment-structure + An event specifying a change-point of the structure of experiment. This event is typically used to indicate a change in experimental conditions or tasks. + + hedId + HED_0012007 + + + + Measurement-event + A discrete measure returned by an instrument. + + suggestedTag + Data-property + + + hedId + HED_0012008 + + + + + Agent + Someone or something that takes an active role or produces a specified effect.The role or effect may be implicit. Being alive or performing an activity such as a computation may qualify something to be an agent. An agent may also be something that simulates something else. + + suggestedTag + Agent-property + + + hedId + HED_0012009 + + + Animal-agent + An agent that is an animal. + + hedId + HED_0012010 + + + + Avatar-agent + An agent associated with an icon or avatar representing another agent. + + hedId + HED_0012011 + + + + Controller-agent + Experiment control software or hardware. + + hedId + HED_0012012 + + + + Human-agent + A person who takes an active role or produces a specified effect. + + hedId + HED_0012013 + + + + Robotic-agent + An agent mechanical device capable of performing a variety of often complex tasks on command or by being programmed in advance. + + hedId + HED_0012014 + + + + Software-agent + An agent computer program that interacts with the participant in an active role such as an AI advisor. + + hedId + HED_0012015 + + + + + Action + Do something. + + extensionAllowed + + + hedId + HED_0012016 + + + Communicate + Action conveying knowledge of or about something. + + hedId + HED_0012017 + + + Communicate-gesturally + Communicate non-verbally using visible bodily actions, either in place of speech or together and in parallel with spoken words. Gestures include movement of the hands, face, or other parts of the body. + + relatedTag + Move-face + Move-upper-extremity + + + hedId + HED_0012018 + + + Clap-hands + Strike the palms of against one another resoundingly, and usually repeatedly, especially to express approval. + + hedId + HED_0012019 + + + + Clear-throat + Cough slightly so as to speak more clearly, attract attention, or to express hesitancy before saying something awkward. + + relatedTag + Move-face + Move-head + + + hedId + HED_0012020 + + + + Frown + Express disapproval, displeasure, or concentration, typically by turning down the corners of the mouth. + + relatedTag + Move-face + + + hedId + HED_0012021 + + + + Grimace + Make a twisted expression, typically expressing disgust, pain, or wry amusement. + + relatedTag + Move-face + + + hedId + HED_0012022 + + + + Nod-head + Tilt head in alternating up and down arcs along the sagittal plane. It is most commonly, but not universally, used to indicate agreement, acceptance, or acknowledgement. + + relatedTag + Move-head + + + hedId + HED_0012023 + + + + Pump-fist + Raise with fist clenched in triumph or affirmation. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012024 + + + + Raise-eyebrows + Move eyebrows upward. + + relatedTag + Move-face + Move-eyes + + + hedId + HED_0012025 + + + + Shake-fist + Clench hand into a fist and shake to demonstrate anger. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012026 + + + + Shake-head + Turn head from side to side as a way of showing disagreement or refusal. + + relatedTag + Move-head + + + hedId + HED_0012027 + + + + Shhh + Place finger over lips and possibly uttering the syllable shhh to indicate the need to be quiet. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012028 + + + + Shrug + Lift shoulders up towards head to indicate a lack of knowledge about a particular topic. + + relatedTag + Move-upper-extremity + Move-torso + + + hedId + HED_0012029 + + + + Smile + Form facial features into a pleased, kind, or amused expression, typically with the corners of the mouth turned up and the front teeth exposed. + + relatedTag + Move-face + + + hedId + HED_0012030 + + + + Spread-hands + Spread hands apart to indicate ignorance. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012031 + + + + Thumb-up + Extend the thumb upward to indicate approval. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012032 + + + + Thumbs-down + Extend the thumb downward to indicate disapproval. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012033 + + + + Wave + Raise hand and move left and right, as a greeting or sign of departure. + + relatedTag + Move-upper-extremity + + + hedId + HED_0012034 + + + + Widen-eyes + Open eyes and possibly with eyebrows lifted especially to express surprise or fear. + + relatedTag + Move-face + Move-eyes + + + hedId + HED_0012035 + + + + Wink + Close and open one eye quickly, typically to indicate that something is a joke or a secret or as a signal of affection or greeting. + + relatedTag + Move-face + Move-eyes + + + hedId + HED_0012036 + + + + + Communicate-musically + Communicate using music. + + hedId + HED_0012037 + + + Hum + Make a low, steady continuous sound like that of a bee. Sing with the lips closed and without uttering speech. + + hedId + HED_0012038 + + + + Play-instrument + Make musical sounds using an instrument. + + hedId + HED_0012039 + + + + Sing + Produce musical tones by means of the voice. + + hedId + HED_0012040 + + + + Vocalize + Utter vocal sounds. + + hedId + HED_0012041 + + + + Whistle + Produce a shrill clear sound by forcing breath out or air in through the puckered lips. + + hedId + HED_0012042 + + + + + Communicate-vocally + Communicate using mouth or vocal cords. + + hedId + HED_0012043 + + + Cry + Shed tears associated with emotions, usually sadness but also joy or frustration. + + hedId + HED_0012044 + + + + Groan + Make a deep inarticulate sound in response to pain or despair. + + hedId + HED_0012045 + + + + Laugh + Make the spontaneous sounds and movements of the face and body that are the instinctive expressions of lively amusement and sometimes also of contempt or derision. + + hedId + HED_0012046 + + + + Scream + Make loud, vociferous cries or yells to express pain, excitement, or fear. + + hedId + HED_0012047 + + + + Shout + Say something very loudly. + + hedId + HED_0012048 + + + + Sigh + Emit a long, deep, audible breath expressing sadness, relief, tiredness, or a similar feeling. + + hedId + HED_0012049 + + + + Speak + Communicate using spoken language. + + hedId + HED_0012050 + + + + Whisper + Speak very softly using breath without vocal cords. + + hedId + HED_0012051 + + + + + + Move + Move in a specified direction or manner. Change position or posture. + + hedId + HED_0012052 + + + Breathe + Inhale or exhale during respiration. + + hedId + HED_0012053 + + + Blow + Expel air through pursed lips. + + hedId + HED_0012054 + + + + Cough + Suddenly and audibly expel air from the lungs through a partially closed glottis, preceded by inhalation. + + hedId + HED_0012055 + + + + Exhale + Blow out or expel breath. + + hedId + HED_0012056 + + + + Hiccup + Involuntarily spasm the diaphragm and respiratory organs, with a sudden closure of the glottis and a characteristic sound like that of a cough. + + hedId + HED_0012057 + + + + Hold-breath + Interrupt normal breathing by ceasing to inhale or exhale. + + hedId + HED_0012058 + + + + Inhale + Draw in with the breath through the nose or mouth. + + hedId + HED_0012059 + + + + Sneeze + Suddenly and violently expel breath through the nose and mouth. + + hedId + HED_0012060 + + + + Sniff + Draw in air audibly through the nose to detect a smell, to stop it from running, or to express contempt. + + hedId + HED_0012061 + + + + + Move-body + Move entire body. + + hedId + HED_0012062 + + + Bend + Move body in a bowed or curved manner. + + hedId + HED_0012063 + + + + Dance + Perform a purposefully selected sequences of human movement often with aesthetic or symbolic value. Move rhythmically to music, typically following a set sequence of steps. + + hedId + HED_0012064 + + + + Fall-down + Lose balance and collapse. + + hedId + HED_0012065 + + + + Flex + Cause a muscle to stand out by contracting or tensing it. Bend a limb or joint. + + hedId + HED_0012066 + + + + Jerk + Make a quick, sharp, sudden movement. + + hedId + HED_0012067 + + + + Lie-down + Move to a horizontal or resting position. + + hedId + HED_0012068 + + + + Recover-balance + Return to a stable, upright body position. + + hedId + HED_0012069 + + + + Shudder + Tremble convulsively, sometimes as a result of fear or revulsion. + + hedId + HED_0012070 + + + + Sit-down + Move from a standing to a sitting position. + + hedId + HED_0012071 + + + + Sit-up + Move from lying down to a sitting position. + + hedId + HED_0012072 + + + + Stand-up + Move from a sitting to a standing position. + + hedId + HED_0012073 + + + + Stretch + Straighten or extend body or a part of body to its full length, typically so as to tighten muscles or in order to reach something. + + hedId + HED_0012074 + + + + Stumble + Trip or momentarily lose balance and almost fall. + + hedId + HED_0012075 + + + + Turn + Change or cause to change direction. + + hedId + HED_0012076 + + + + + Move-body-part + Move one part of a body. + + hedId + HED_0012077 + + + Move-eyes + Move eyes. + + hedId + HED_0012078 + + + Blink + Shut and open the eyes quickly. + + hedId + HED_0012079 + + + + Close-eyes + Lower and keep eyelids in a closed position. + + hedId + HED_0012080 + + + + Fixate + Direct eyes to a specific point or target. + + hedId + HED_0012081 + + + + Inhibit-blinks + Purposely prevent blinking. + + hedId + HED_0012082 + + + + Open-eyes + Raise eyelids to expose pupil. + + hedId + HED_0012083 + + + + Saccade + Move eyes rapidly between fixation points. + + hedId + HED_0012084 + + + + Squint + Squeeze one or both eyes partly closed in an attempt to see more clearly or as a reaction to strong light. + + hedId + HED_0012085 + + + + Stare + Look fixedly or vacantly at someone or something with eyes wide open. + + hedId + HED_0012086 + + + + + Move-face + Move the face or jaw. + + hedId + HED_0012087 + + + Bite + Seize with teeth or jaws an object or organism so as to grip or break the surface covering. + + hedId + HED_0012088 + + + + Burp + Noisily release air from the stomach through the mouth. Belch. + + hedId + HED_0012089 + + + + Chew + Repeatedly grinding, tearing, and or crushing with teeth or jaws. + + hedId + HED_0012090 + + + + Gurgle + Make a hollow bubbling sound like that made by water running out of a bottle. + + hedId + HED_0012091 + + + + Swallow + Cause or allow something, especially food or drink to pass down the throat. + + hedId + HED_0012092 + + + Gulp + Swallow quickly or in large mouthfuls, often audibly, sometimes to indicate apprehension. + + hedId + HED_0012093 + + + + + Yawn + Take a deep involuntary inhalation with the mouth open often as a sign of drowsiness or boredom. + + hedId + HED_0012094 + + + + + Move-head + Move head. + + hedId + HED_0012095 + + + Lift-head + Tilt head back lifting chin. + + hedId + HED_0012096 + + + + Lower-head + Move head downward so that eyes are in a lower position. + + hedId + HED_0012097 + + + + Turn-head + Rotate head horizontally to look in a different direction. + + hedId + HED_0012098 + + + + + Move-lower-extremity + Move leg and/or foot. + + hedId + HED_0012099 + + + Curl-toes + Bend toes sometimes to grip. + + hedId + HED_0012100 + + + + Hop + Jump on one foot. + + hedId + HED_0012101 + + + + Jog + Run at a trot to exercise. + + hedId + HED_0012102 + + + + Jump + Move off the ground or other surface through sudden muscular effort in the legs. + + hedId + HED_0012103 + + + + Kick + Strike out or flail with the foot or feet.Strike using the leg, in unison usually with an area of the knee or lower using the foot. + + hedId + HED_0012104 + + + + Pedal + Move by working the pedals of a bicycle or other machine. + + hedId + HED_0012105 + + + + Press-foot + Move by pressing foot. + + hedId + HED_0012106 + + + + Run + Travel on foot at a fast pace. + + hedId + HED_0012107 + + + + Step + Put one leg in front of the other and shift weight onto it. + + hedId + HED_0012108 + + + Heel-strike + Strike the ground with the heel during a step. + + hedId + HED_0012109 + + + + Toe-off + Push with toe as part of a stride. + + hedId + HED_0012110 + + + + + Trot + Run at a moderate pace, typically with short steps. + + hedId + HED_0012111 + + + + Walk + Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once. + + hedId + HED_0012112 + + + + + Move-torso + Move body trunk. + + hedId + HED_0012113 + + + + Move-upper-extremity + Move arm, shoulder, and/or hand. + + hedId + HED_0012114 + + + Drop + Let or cause to fall vertically. + + hedId + HED_0012115 + + + + Grab + Seize suddenly or quickly. Snatch or clutch. + + hedId + HED_0012116 + + + + Grasp + Seize and hold firmly. + + hedId + HED_0012117 + + + + Hold-down + Prevent someone or something from moving by holding them firmly. + + hedId + HED_0012118 + + + + Lift + Raising something to higher position. + + hedId + HED_0012119 + + + + Make-fist + Close hand tightly with the fingers bent against the palm. + + hedId + HED_0012120 + + + + Point + Draw attention to something by extending a finger or arm. + + hedId + HED_0012121 + + + + Press + Apply pressure to something to flatten, shape, smooth or depress it. This action tag should be used to indicate key presses and mouse clicks. + + relatedTag + Push + + + hedId + HED_0012122 + + + + Push + Apply force in order to move something away. Use Press to indicate a key press or mouse click. + + relatedTag + Press + + + hedId + HED_0012123 + + + + Reach + Stretch out your arm in order to get or touch something. + + hedId + HED_0012124 + + + + Release + Make available or set free. + + hedId + HED_0012125 + + + + Retract + Draw or pull back. + + hedId + HED_0012126 + + + + Scratch + Drag claws or nails over a surface or on skin. + + hedId + HED_0012127 + + + + Snap-fingers + Make a noise by pushing second finger hard against thumb and then releasing it suddenly so that it hits the base of the thumb. + + hedId + HED_0012128 + + + + Touch + Come into or be in contact with. + + hedId + HED_0012129 + + + + + + + Perceive + Produce an internal, conscious image through stimulating a sensory system. + + hedId + HED_0012130 + + + Hear + Give attention to a sound. + + hedId + HED_0012131 + + + + See + Direct gaze toward someone or something or in a specified direction. + + hedId + HED_0012132 + + + + Sense-by-touch + Sense something through receptors in the skin. + + hedId + HED_0012133 + + + + Smell + Inhale in order to ascertain an odor or scent. + + hedId + HED_0012134 + + + + Taste + Sense a flavor in the mouth and throat on contact with a substance. + + hedId + HED_0012135 + + + + + Perform + Carry out or accomplish an action, task, or function. + + hedId + HED_0012136 + + + Close + Act as to blocked against entry or passage. + + hedId + HED_0012137 + + + + Collide-with + Hit with force when moving. + + hedId + HED_0012138 + + + + Halt + Bring or come to an abrupt stop. + + hedId + HED_0012139 + + + + Modify + Change something. + + hedId + HED_0012140 + + + + Open + Widen an aperture, door, or gap, especially one allowing access to something. + + hedId + HED_0012141 + + + + Operate + Control the functioning of a machine, process, or system. + + hedId + HED_0012142 + + + + Play + Engage in activity for enjoyment and recreation rather than a serious or practical purpose. + + hedId + HED_0012143 + + + + Read + Interpret something that is written or printed. + + hedId + HED_0012144 + + + + Repeat + Make do or perform again. + + hedId + HED_0012145 + + + + Rest + Be inactive in order to regain strength, health, or energy. + + hedId + HED_0012146 + + + + Ride + Ride on an animal or in a vehicle. Ride conveys some notion that another agent has partial or total control of the motion. + + hedId + HED_0012147 + + + + Write + Communicate or express by means of letters or symbols written or imprinted on a surface. + + hedId + HED_0012148 + + + + + Think + Direct the mind toward someone or something or use the mind actively to form connected ideas. + + hedId + HED_0012149 + + + Allow + Allow access to something such as allowing a car to pass. + + hedId + HED_0012150 + + + + Attend-to + Focus mental experience on specific targets. + + hedId + HED_0012151 + + + + Count + Tally items either silently or aloud. + + hedId + HED_0012152 + + + + Deny + Refuse to give or grant something requested or desired by someone. + + hedId + HED_0012153 + + + + Detect + Discover or identify the presence or existence of something. + + hedId + HED_0012154 + + + + Discriminate + Recognize a distinction. + + hedId + HED_0012155 + + + + Encode + Convert information or an instruction into a particular form. + + hedId + HED_0012156 + + + + Evade + Escape or avoid, especially by cleverness or trickery. + + hedId + HED_0012157 + + + + Generate + Cause something, especially an emotion or situation to arise or come about. + + hedId + HED_0012158 + + + + Identify + Establish or indicate who or what someone or something is. + + hedId + HED_0012159 + + + + Imagine + Form a mental image or concept of something. + + hedId + HED_0012160 + + + + Judge + Evaluate evidence to make a decision or form a belief. + + hedId + HED_0012161 + + + + Learn + Adaptively change behavior as the result of experience. + + hedId + HED_0012162 + + + + Memorize + Adaptively change behavior as the result of experience. + + hedId + HED_0012163 + + + + Plan + Think about the activities required to achieve a desired goal. + + hedId + HED_0012164 + + + + Predict + Say or estimate that something will happen or will be a consequence of something without having exact information. + + hedId + HED_0012165 + + + + Recall + Remember information by mental effort. + + hedId + HED_0012166 + + + + Recognize + Identify someone or something from having encountered them before. + + hedId + HED_0012167 + + + + Respond + React to something such as a treatment or a stimulus. + + hedId + HED_0012168 + + + + Switch-attention + Transfer attention from one focus to another. + + hedId + HED_0012169 + + + + Track + Follow a person, animal, or object through space or time. + + hedId + HED_0012170 + + + + + + Item + An independently existing thing (living or nonliving). + + extensionAllowed + + + hedId + HED_0012171 + + + Biological-item + An entity that is biological, that is related to living organisms. + + hedId + HED_0012172 + + + Anatomical-item + A biological structure, system, fluid or other substance excluding single molecular entities. + + hedId + HED_0012173 + + + Body + The biological structure representing an organism. + + hedId + HED_0012174 + + + + Body-part + Any part of an organism. + + hedId + HED_0012175 + + + Head + The upper part of the human body, or the front or upper part of the body of an animal, typically separated from the rest of the body by a neck, and containing the brain, mouth, and sense organs. + + hedId + HED_0012176 + + + + Head-part + A part of the head. + + hedId + HED_0013200 + + + Brain + Organ inside the head that is made up of nerve cells and controls the body. + + hedId + HED_0012177 + + + + Brain-region + A region of the brain. + + hedId + HED_0013201 + + + Cerebellum + A major structure of the brain located near the brainstem. It plays a key role in motor control, coordination, precision, with contributions to different cognitive functions. + + hedId + HED_0013202 + + + + Frontal-lobe + + hedId + HED_0012178 + + + + Occipital-lobe + + hedId + HED_0012179 + + + + Parietal-lobe + + hedId + HED_0012180 + + + + Temporal-lobe + + hedId + HED_0012181 + + + + + Ear + A sense organ needed for the detection of sound and for establishing balance. + + hedId + HED_0012182 + + + + Face + The anterior portion of the head extending from the forehead to the chin and ear to ear. The facial structures contain the eyes, nose and mouth, cheeks and jaws. + + hedId + HED_0012183 + + + + Face-part + A part of the face. + + hedId + HED_0013203 + + + Cheek + The fleshy part of the face bounded by the eyes, nose, ear, and jawline. + + hedId + HED_0012184 + + + + Chin + The part of the face below the lower lip and including the protruding part of the lower jaw. + + hedId + HED_0012185 + + + + Eye + The organ of sight or vision. + + hedId + HED_0012186 + + + + Eyebrow + The arched strip of hair on the bony ridge above each eye socket. + + hedId + HED_0012187 + + + + Eyelid + The folds of the skin that cover the eye when closed. + + hedId + HED_0012188 + + + + Forehead + The part of the face between the eyebrows and the normal hairline. + + hedId + HED_0012189 + + + + Lip + Fleshy fold which surrounds the opening of the mouth. + + hedId + HED_0012190 + + + + Mouth + The proximal portion of the digestive tract, containing the oral cavity and bounded by the oral opening. + + hedId + HED_0012191 + + + + Mouth-part + A part of the mouth. + + hedId + HED_0013204 + + + Teeth + The hard bone-like structures in the jaws. A collection of teeth arranged in some pattern in the mouth or other part of the body. + + hedId + HED_0012193 + + + + Tongue + A muscular organ in the mouth with significant role in mastication, swallowing, speech, and taste. + + hedId + HED_0013205 + + + + + Nose + A structure of special sense serving as an organ of the sense of smell and as an entrance to the respiratory tract. + + hedId + HED_0012192 + + + + + Hair + The filamentous outgrowth of the epidermis. + + hedId + HED_0012194 + + + + + Lower-extremity + Refers to the whole inferior limb (leg and/or foot). + + hedId + HED_0012195 + + + + Lower-extremity-part + A part of the lower extremity. + + hedId + HED_0013206 + + + Ankle + A gliding joint between the distal ends of the tibia and fibula and the proximal end of the talus. + + hedId + HED_0012196 + + + + Foot + The structure found below the ankle joint required for locomotion. + + hedId + HED_0012198 + + + + Foot-part + A part of the foot. + + hedId + HED_0013207 + + + Heel + The back of the foot below the ankle. + + hedId + HED_0012200 + + + + Instep + The part of the foot between the ball and the heel on the inner side. + + hedId + HED_0012201 + + + + Toe + A digit of the foot. + + hedId + HED_0013208 + + + Big-toe + The largest toe on the inner side of the foot. + + hedId + HED_0012199 + + + + Little-toe + The smallest toe located on the outer side of the foot. + + hedId + HED_0012202 + + + + + Toes + The terminal digits of the foot. Used to describe collective attributes of all toes, such as bending all toes + + relatedTag + Toe + + + hedId + HED_0012203 + + + + + Knee + A joint connecting the lower part of the femur with the upper part of the tibia. + + hedId + HED_0012204 + + + + Lower-leg + The part of the leg between the knee and the ankle. + + hedId + HED_0013209 + + + + Lower-leg-part + A part of the lower leg. + + hedId + HED_0013210 + + + Calf + The fleshy part at the back of the leg below the knee. + + hedId + HED_0012197 + + + + Shin + Front part of the leg below the knee. + + hedId + HED_0012205 + + + + + Upper-leg + The part of the leg between the hip and the knee. + + hedId + HED_0013211 + + + + Upper-leg-part + A part of the upper leg. + + hedId + HED_0013212 + + + Thigh + Upper part of the leg between hip and knee. + + hedId + HED_0012206 + + + + + + Neck + The part of the body connecting the head to the torso, containing the cervical spine and vital pathways of nerves, blood vessels, and the airway. + + hedId + HED_0013213 + + + + Torso + The body excluding the head and neck and limbs. + + hedId + HED_0012207 + + + + Torso-part + A part of the torso. + + hedId + HED_0013214 + + + Abdomen + The part of the body between the thorax and the pelvis. + + hedId + HED_0013215 + + + + Navel + The central mark on the abdomen created by the detachment of the umbilical cord after birth. + + hedId + HED_0013216 + + + + Pelvis + The bony structure at the base of the spine supporting the legs. + + hedId + HED_0013217 + + + + Pelvis-part + A part of the pelvis. + + hedId + HED_0013218 + + + Buttocks + The round fleshy parts that form the lower rear area of a human trunk. + + hedId + HED_0012208 + + + + Genitalia + The external organs of reproduction and urination, located in the pelvic region. This includes both male and female genital structures. + + hedId + HED_0013219 + + + + Gentalia + The external organs of reproduction. Deprecated due to spelling error. Use Genitalia. + + deprecatedFrom + 8.1.0 + + + hedId + HED_0012209 + + + + Hip + The lateral prominence of the pelvis from the waist to the thigh. + + hedId + HED_0012210 + + + + + Torso-back + The rear surface of the human body from the shoulders to the hips. + + hedId + HED_0012211 + + + + Torso-chest + The anterior side of the thorax from the neck to the abdomen. + + hedId + HED_0012212 + + + + Viscera + Internal organs of the body. + + hedId + HED_0012213 + + + + Waist + The abdominal circumference at the navel. + + hedId + HED_0012214 + + + + + Upper-extremity + Refers to the whole superior limb (shoulder, arm, elbow, wrist, hand). + + hedId + HED_0012215 + + + + Upper-extremity-part + A part of the upper extremity. + + hedId + HED_0013220 + + + Elbow + A type of hinge joint located between the forearm and upper arm. + + hedId + HED_0012216 + + + + Forearm + Lower part of the arm between the elbow and wrist. + + hedId + HED_0012217 + + + + Forearm-part + A part of the forearm. + + hedId + HED_0013221 + + + + Hand + The distal portion of the upper extremity. It consists of the carpus, metacarpus, and digits. + + hedId + HED_0012218 + + + + Hand-part + A part of the hand. + + hedId + HED_0013222 + + + Finger + Any of the digits of the hand. + + hedId + HED_0012219 + + + Index-finger + The second finger from the radial side of the hand, next to the thumb. + + hedId + HED_0012220 + + + + Little-finger + The fifth and smallest finger from the radial side of the hand. + + hedId + HED_0012221 + + + + Middle-finger + The middle or third finger from the radial side of the hand. + + hedId + HED_0012222 + + + + Ring-finger + The fourth finger from the radial side of the hand. + + hedId + HED_0012223 + + + + Thumb + The thick and short hand digit which is next to the index finger in humans. + + hedId + HED_0012224 + + + + + Fingers + The terminal digits of the hand. Used to describe collective attributes of all fingers, such as bending all fingers + + relatedTag + Finger + + + hedId + HED_0013223 + + + + Knuckles + A part of a finger at a joint where the bone is near the surface, especially where the finger joins the hand. + + hedId + HED_0012225 + + + + Palm + The part of the inner surface of the hand that extends from the wrist to the bases of the fingers. + + hedId + HED_0012226 + + + + + Shoulder + Joint attaching upper arm to trunk. + + hedId + HED_0012227 + + + + Upper-arm + Portion of arm between shoulder and elbow. + + hedId + HED_0012228 + + + + Upper-arm-part + A part of the upper arm. + + hedId + HED_0013224 + + + + Wrist + A joint between the distal end of the radius and the proximal row of carpal bones. + + hedId + HED_0012229 + + + + + + + Organism + A living entity, more specifically a biological entity that consists of one or more cells and is capable of genomic replication (independently or not). + + hedId + HED_0012230 + + + Animal + A living organism that has membranous cell walls, requires oxygen and organic foods, and is capable of voluntary movement. + + hedId + HED_0012231 + + + + Human + The bipedal primate mammal Homo sapiens. + + hedId + HED_0012232 + + + + Plant + Any living organism that typically synthesizes its food from inorganic substances and possesses cellulose cell walls. + + hedId + HED_0012233 + + + + + + Language-item + An entity related to a systematic means of communicating by the use of sounds, symbols, or gestures. + + suggestedTag + Sensory-presentation + + + hedId + HED_0012234 + + + Character + A mark or symbol used in writing. + + hedId + HED_0012235 + + + + Clause + A unit of grammatical organization next below the sentence in rank, usually consisting of a subject and predicate. + + hedId + HED_0012236 + + + + Glyph + A hieroglyphic character, symbol, or pictograph. + + hedId + HED_0012237 + + + + Nonword + An unpronounceable group of letters or speech sounds that is surrounded by white space when written, is not accepted as a word by native speakers. + + hedId + HED_0012238 + + + + Paragraph + A distinct section of a piece of writing, usually dealing with a single theme. + + hedId + HED_0012239 + + + + Phoneme + Any of the minimally distinct units of sound in a specified language that distinguish one word from another. + + hedId + HED_0012240 + + + + Phrase + A phrase is a group of words functioning as a single unit in the syntax of a sentence. + + hedId + HED_0012241 + + + + Pseudoword + A pronounceable group of letters or speech sounds that looks or sounds like a word but that is not accepted as such by native speakers. + + hedId + HED_0012242 + + + + Sentence + A set of words that is complete in itself, conveying a statement, question, exclamation, or command and typically containing an explicit or implied subject and a predicate containing a finite verb. + + hedId + HED_0012243 + + + + Syllable + A unit of pronunciation having a vowel or consonant sound, with or without surrounding consonants, forming the whole or a part of a word. + + hedId + HED_0012244 + + + + Textblock + A block of text. + + hedId + HED_0012245 + + + + Word + A single distinct meaningful element of speech or writing, used with others (or sometimes alone) to form a sentence and typically surrounded by white space when written or printed. + + hedId + HED_0012246 + + + + + Object + Something perceptible by one or more of the senses, especially by vision or touch. A material thing. + + suggestedTag + Sensory-presentation + + + hedId + HED_0012247 + + + Geometric-object + An object or a representation that has structure and topology in space. + + hedId + HED_0012248 + + + 2D-shape + A planar, two-dimensional shape. + + hedId + HED_0012249 + + + Arrow + A shape with a pointed end indicating direction. + + hedId + HED_0012250 + + + + Clockface + The dial face of a clock. A location identifier based on clock-face-position numbering or anatomic subregion. + + hedId + HED_0012251 + + + + Cross + A figure or mark formed by two intersecting lines crossing at their midpoints. + + hedId + HED_0012252 + + + + Dash + A horizontal stroke in writing or printing to mark a pause or break in sense or to represent omitted letters or words. + + hedId + HED_0012253 + + + + Ellipse + A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base. + + hedId + HED_0012254 + + + Circle + A ring-shaped structure with every point equidistant from the center. + + hedId + HED_0012255 + + + + + Rectangle + A parallelogram with four right angles. + + hedId + HED_0012256 + + + Square + A square is a special rectangle with four equal sides. + + hedId + HED_0012257 + + + + + Single-point + A point is a geometric entity that is located in a zero-dimensional spatial region and whose position is defined by its coordinates in some coordinate system. + + hedId + HED_0012258 + + + + Star + A conventional or stylized representation of a star, typically one having five or more points. + + hedId + HED_0012259 + + + + Triangle + A three-sided polygon. + + hedId + HED_0012260 + + + + + 3D-shape + A geometric three-dimensional shape. + + hedId + HED_0012261 + + + Box + A square or rectangular vessel, usually made of cardboard or plastic. + + hedId + HED_0012262 + + + Cube + A solid or semi-solid in the shape of a three dimensional square. + + hedId + HED_0012263 + + + + + Cone + A shape whose base is a circle and whose sides taper up to a point. + + hedId + HED_0012264 + + + + Cylinder + A surface formed by circles of a given radius that are contained in a plane perpendicular to a given axis, whose centers align on the axis. + + hedId + HED_0012265 + + + + Ellipsoid + A closed plane curve resulting from the intersection of a circular cone and a plane cutting completely through it, especially a plane not parallel to the base. + + hedId + HED_0012266 + + + Sphere + A solid or hollow three-dimensional object bounded by a closed surface such that every point on the surface is equidistant from the center. + + hedId + HED_0012267 + + + + + Pyramid + A polyhedron of which one face is a polygon of any number of sides, and the other faces are triangles with a common vertex. + + hedId + HED_0012268 + + + + + Pattern + An arrangement of objects, facts, behaviors, or other things which have scientific, mathematical, geometric, statistical, or other meaning. + + hedId + HED_0012269 + + + Dots + A small round mark or spot. + + hedId + HED_0012270 + + + + LED-pattern + A pattern created by lighting selected members of a fixed light emitting diode array. + + hedId + HED_0012271 + + + + + + Ingestible-object + Something that can be taken into the body by the mouth for digestion or absorption. + + hedId + HED_0012272 + + + + Man-made-object + Something constructed by human means. + + hedId + HED_0012273 + + + Building + A structure that has a roof and walls and stands more or less permanently in one place. + + hedId + HED_0012274 + + + Attic + A room or a space immediately below the roof of a building. + + hedId + HED_0012275 + + + + Basement + The part of a building that is wholly or partly below ground level. + + hedId + HED_0012276 + + + + Entrance + The means or place of entry. + + hedId + HED_0012277 + + + + Roof + A roof is the covering on the uppermost part of a building which provides protection from animals and weather, notably rain, but also heat, wind and sunlight. + + hedId + HED_0012278 + + + + Room + An area within a building enclosed by walls and floor and ceiling. + + hedId + HED_0012279 + + + + + Clothing + A covering designed to be worn on the body. + + hedId + HED_0012280 + + + + Device + An object contrived for a specific purpose. + + hedId + HED_0012281 + + + Assistive-device + A device that help an individual accomplish a task. + + hedId + HED_0012282 + + + Glasses + Frames with lenses worn in front of the eye for vision correction, eye protection, or protection from UV rays. + + hedId + HED_0012283 + + + + Writing-device + A device used for writing. + + hedId + HED_0012284 + + + Pen + A common writing instrument used to apply ink to a surface for writing or drawing. + + hedId + HED_0012285 + + + + Pencil + An implement for writing or drawing that is constructed of a narrow solid pigment core in a protective casing that prevents the core from being broken or marking the hand. + + hedId + HED_0012286 + + + + + + Computing-device + An electronic device which take inputs and processes results from the inputs. + + hedId + HED_0012287 + + + Cellphone + A telephone with access to a cellular radio system so it can be used over a wide area, without a physical connection to a network. + + hedId + HED_0012288 + + + + Desktop-computer + A computer suitable for use at an ordinary desk. + + hedId + HED_0012289 + + + + Laptop-computer + A computer that is portable and suitable for use while traveling. + + hedId + HED_0012290 + + + + Tablet-computer + A small portable computer that accepts input directly on to its screen rather than via a keyboard or mouse. + + hedId + HED_0012291 + + + + + Engine + A motor is a machine designed to convert one or more forms of energy into mechanical energy. + + hedId + HED_0012292 + + + + IO-device + Hardware used by a human (or other system) to communicate with a computer. + + hedId + HED_0012293 + + + Input-device + A piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance. + + hedId + HED_0012294 + + + Computer-mouse + A hand-held pointing device that detects two-dimensional motion relative to a surface. + + hedId + HED_0012295 + + + Mouse-button + An electric switch on a computer mouse which can be pressed or clicked to select or interact with an element of a graphical user interface. + + hedId + HED_0012296 + + + + Scroll-wheel + A scroll wheel or mouse wheel is a wheel used for scrolling made of hard plastic with a rubbery surface usually located between the left and right mouse buttons and is positioned perpendicular to the mouse surface. + + hedId + HED_0012297 + + + + + Joystick + A control device that uses a movable handle to create two-axis input for a computer device. + + hedId + HED_0012298 + + + + Keyboard + A device consisting of mechanical keys that are pressed to create input to a computer. + + hedId + HED_0012299 + + + Keyboard-key + A button on a keyboard usually representing letters, numbers, functions, or symbols. + + hedId + HED_0012300 + + + # + Value of a keyboard key. + + takesValue + + + hedId + HED_0012301 + + + + + + Keypad + A device consisting of keys, usually in a block arrangement, that provides limited input to a system. + + hedId + HED_0012302 + + + Keypad-key + A key on a separate section of a computer keyboard that groups together numeric keys and those for mathematical or other special functions in an arrangement like that of a calculator. + + hedId + HED_0012303 + + + # + Value of keypad key. + + takesValue + + + hedId + HED_0012304 + + + + + + Microphone + A device designed to convert sound to an electrical signal. + + hedId + HED_0012305 + + + + Push-button + A switch designed to be operated by pressing a button. + + hedId + HED_0012306 + + + + + Output-device + Any piece of computer hardware equipment which converts information into human understandable form. + + hedId + HED_0012307 + + + Auditory-device + A device designed to produce sound. + + hedId + HED_0012308 + + + Headphones + An instrument that consists of a pair of small loudspeakers, or less commonly a single speaker, held close to ears and connected to a signal source such as an audio amplifier, radio, CD player or portable media player. + + hedId + HED_0012309 + + + + Loudspeaker + A device designed to convert electrical signals to sounds that can be heard. + + hedId + HED_0012310 + + + + + Display-device + An output device for presentation of information in visual or tactile form the latter used for example in tactile electronic displays for blind people. + + hedId + HED_0012311 + + + Computer-screen + An electronic device designed as a display or a physical device designed to be a protective mesh work. + + hedId + HED_0012312 + + + Screen-window + A part of a computer screen that contains a display different from the rest of the screen. A window is a graphical control element consisting of a visual area containing some of the graphical user interface of the program it belongs to and is framed by a window decoration. + + hedId + HED_0012313 + + + + + Head-mounted-display + An instrument that functions as a display device, worn on the head or as part of a helmet, that has a small display optic in front of one (monocular HMD) or each eye (binocular HMD). + + hedId + HED_0012314 + + + + LED-display + A LED display is a flat panel display that uses an array of light-emitting diodes as pixels for a video display. + + hedId + HED_0012315 + + + + + + Recording-device + A device that copies information in a signal into a persistent information bearer. + + hedId + HED_0012316 + + + EEG-recorder + A device for recording electric currents in the brain using electrodes applied to the scalp, to the surface of the brain, or placed within the substance of the brain. + + hedId + HED_0012317 + + + + EMG-recorder + A device for recording electrical activity of muscles using electrodes on the body surface or within the muscular mass. + + hedId + HED_0013225 + + + + File-storage + A device for recording digital information to a permanent media. + + hedId + HED_0012318 + + + + MEG-recorder + A device for measuring the magnetic fields produced by electrical activity in the brain, usually conducted externally. + + hedId + HED_0012319 + + + + Motion-capture + A device for recording the movement of objects or people. + + hedId + HED_0012320 + + + + Tape-recorder + A device for recording and reproduction usually using magnetic tape for storage that can be saved and played back. + + hedId + HED_0012321 + + + + + Touchscreen + A control component that operates an electronic device by pressing the display on the screen. + + hedId + HED_0012322 + + + + + Machine + A human-made device that uses power to apply forces and control movement to perform an action. + + hedId + HED_0012323 + + + + Measurement-device + A device that measures something. + + hedId + HED_0012324 + + + Clock + A device designed to indicate the time of day or to measure the time duration of an event or action. + + hedId + HED_0012325 + + + + + Robot + A mechanical device that sometimes resembles a living animal and is capable of performing a variety of often complex human tasks on command or by being programmed in advance. + + hedId + HED_0012327 + + + + Tool + A component that is not part of a device but is designed to support its assembly or operation. + + hedId + HED_0012328 + + + + + Document + A physical object, or electronic counterpart, that is characterized by containing writing which is meant to be human-readable. + + hedId + HED_0012329 + + + Book + A volume made up of pages fastened along one edge and enclosed between protective covers. + + hedId + HED_0012330 + + + + Letter + A written message addressed to a person or organization. + + hedId + HED_0012331 + + + + Note + A brief written record. + + hedId + HED_0012332 + + + + Notebook + A book for notes or memoranda. + + hedId + HED_0012333 + + + + Questionnaire + A document consisting of questions and possibly responses, depending on whether it has been filled out. + + hedId + HED_0012334 + + + + + Furnishing + Furniture, fittings, and other decorative accessories, such as curtains and carpets, for a house or room. + + hedId + HED_0012335 + + + + Manufactured-material + Substances created or extracted from raw materials. + + hedId + HED_0012336 + + + Ceramic + A hard, brittle, heat-resistant and corrosion-resistant material made by shaping and then firing a nonmetallic mineral, such as clay, at a high temperature. + + hedId + HED_0012337 + + + + Glass + A brittle transparent solid with irregular atomic structure. + + hedId + HED_0012338 + + + + Paper + A thin sheet material produced by mechanically or chemically processing cellulose fibres derived from wood, rags, grasses or other vegetable sources in water. + + hedId + HED_0012339 + + + + Plastic + Various high-molecular-weight thermoplastic or thermo-setting polymers that are capable of being molded, extruded, drawn, or otherwise shaped and then hardened into a form. + + hedId + HED_0012340 + + + + Steel + An alloy made up of iron with typically a few tenths of a percent of carbon to improve its strength and fracture resistance compared to iron. + + hedId + HED_0012341 + + + + + Media + Media are audio/visual/audiovisual modes of communicating information for mass consumption. + + hedId + HED_0012342 + + + Media-clip + A short segment of media. + + hedId + HED_0012343 + + + Audio-clip + A short segment of audio. + + hedId + HED_0012344 + + + + Audiovisual-clip + A short media segment containing both audio and video. + + hedId + HED_0012345 + + + + Video-clip + A short segment of video. + + hedId + HED_0012346 + + + + + Visualization + An planned process that creates images, diagrams or animations from the input data. + + hedId + HED_0012347 + + + Animation + A form of graphical illustration that changes with time to give a sense of motion or represent dynamic changes in the portrayal. + + hedId + HED_0012348 + + + + Art-installation + A large-scale, mixed-media constructions, often designed for a specific place or for a temporary period of time. + + hedId + HED_0012349 + + + + Braille + A display using a system of raised dots that can be read with the fingers by people who are blind. + + hedId + HED_0012350 + + + + Image + Any record of an imaging event whether physical or electronic. + + hedId + HED_0012351 + + + Cartoon + A type of illustration, sometimes animated, typically in a non-realistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either an image or series of images intended for satire, caricature, or humor. A motion picture that relies on a sequence of illustrations for its animation. + + hedId + HED_0012352 + + + + Drawing + A representation of an object or outlining a figure, plan, or sketch by means of lines. + + hedId + HED_0012353 + + + + Icon + A sign (such as a word or graphic symbol) whose form suggests its meaning. + + hedId + HED_0012354 + + + + Painting + A work produced through the art of painting. + + hedId + HED_0012355 + + + + Photograph + An image recorded by a camera. + + hedId + HED_0012356 + + + + + Movie + A sequence of images displayed in succession giving the illusion of continuous movement. + + hedId + HED_0012357 + + + + Outline-visualization + A visualization consisting of a line or set of lines enclosing or indicating the shape of an object in a sketch or diagram. + + hedId + HED_0012358 + + + + Point-light-visualization + A display in which action is depicted using a few points of light, often generated from discrete sensors in motion capture. + + hedId + HED_0012359 + + + + Sculpture + A two- or three-dimensional representative or abstract forms, especially by carving stone or wood or by casting metal or plaster. + + hedId + HED_0012360 + + + + Stick-figure-visualization + A drawing showing the head of a human being or animal as a circle and all other parts as straight lines. + + hedId + HED_0012361 + + + + + + Navigational-object + An object whose purpose is to assist directed movement from one location to another. + + hedId + HED_0012362 + + + Path + A trodden way. A way or track laid down for walking or made by continual treading. + + hedId + HED_0012363 + + + + Road + An open way for the passage of vehicles, persons, or animals on land. + + hedId + HED_0012364 + + + Lane + A defined path with physical dimensions through which an object or substance may traverse. + + hedId + HED_0012365 + + + + + Runway + A paved strip of ground on a landing field for the landing and takeoff of aircraft. + + hedId + HED_0012366 + + + + + Vehicle + A mobile machine which transports people or cargo. + + hedId + HED_0012367 + + + Aircraft + A vehicle which is able to travel through air in an atmosphere. + + hedId + HED_0012368 + + + + Bicycle + A human-powered, pedal-driven, single-track vehicle, having two wheels attached to a frame, one behind the other. + + hedId + HED_0012369 + + + + Boat + A watercraft of any size which is able to float or plane on water. + + hedId + HED_0012370 + + + + Car + A wheeled motor vehicle used primarily for the transportation of human passengers. + + hedId + HED_0012371 + + + + Cart + A cart is a vehicle which has two wheels and is designed to transport human passengers or cargo. + + hedId + HED_0012372 + + + + Tractor + A mobile machine specifically designed to deliver a high tractive effort at slow speeds, and mainly used for the purposes of hauling a trailer or machinery used in agriculture or construction. + + hedId + HED_0012373 + + + + Train + A connected line of railroad cars with or without a locomotive. + + hedId + HED_0012374 + + + + Truck + A motor vehicle which, as its primary function, transports cargo rather than human passengers. + + hedId + HED_0012375 + + + + + + Natural-object + Something that exists in or is produced by nature, and is not artificial or man-made. + + hedId + HED_0012376 + + + Mineral + A solid, homogeneous, inorganic substance occurring in nature and having a definite chemical composition. + + hedId + HED_0012377 + + + + Natural-feature + A feature that occurs in nature. A prominent or identifiable aspect, region, or site of interest. + + hedId + HED_0012378 + + + Field + An unbroken expanse as of ice or grassland. + + hedId + HED_0012379 + + + + Hill + A rounded elevation of limited extent rising above the surrounding land with local relief of less than 300m. + + hedId + HED_0012380 + + + + Mountain + A landform that extends above the surrounding terrain in a limited area. + + hedId + HED_0012381 + + + + River + A natural freshwater surface stream of considerable volume and a permanent or seasonal flow, moving in a definite channel toward a sea, lake, or another river. + + hedId + HED_0012382 + + + + Waterfall + A sudden descent of water over a step or ledge in the bed of a river. + + hedId + HED_0012383 + + + + + + + Sound + Mechanical vibrations transmitted by an elastic medium. Something that can be heard. + + hedId + HED_0012384 + + + Environmental-sound + Sounds occurring in the environment. An accumulation of noise pollution that occurs outside. This noise can be caused by transport, industrial, and recreational activities. + + hedId + HED_0012385 + + + Crowd-sound + Noise produced by a mixture of sounds from a large group of people. + + hedId + HED_0012386 + + + + Signal-noise + Any part of a signal that is not the true or original signal but is introduced by the communication mechanism. + + hedId + HED_0012387 + + + + + Musical-sound + Sound produced by continuous and regular vibrations, as opposed to noise. + + hedId + HED_0012388 + + + Instrument-sound + Sound produced by a musical instrument. + + hedId + HED_0012389 + + + + Tone + A musical note, warble, or other sound used as a particular signal on a telephone or answering machine. + + hedId + HED_0012390 + + + + Vocalized-sound + Musical sound produced by vocal cords in a biological agent. + + hedId + HED_0012391 + + + + + Named-animal-sound + A sound recognizable as being associated with particular animals. + + hedId + HED_0012392 + + + Barking + Sharp explosive cries like sounds made by certain animals, especially a dog, fox, or seal. + + hedId + HED_0012393 + + + + Bleating + Wavering cries like sounds made by a sheep, goat, or calf. + + hedId + HED_0012394 + + + + Chirping + Short, sharp, high-pitched noises like sounds made by small birds or an insects. + + hedId + HED_0012395 + + + + Crowing + Loud shrill sounds characteristic of roosters. + + hedId + HED_0012396 + + + + Growling + Low guttural sounds like those that made in the throat by a hostile dog or other animal. + + hedId + HED_0012397 + + + + Meowing + Vocalizations like those made by as those cats. These sounds have diverse tones and are sometimes chattered, murmured or whispered. The purpose can be assertive. + + hedId + HED_0012398 + + + + Mooing + Deep vocal sounds like those made by a cow. + + hedId + HED_0012399 + + + + Purring + Low continuous vibratory sound such as those made by cats. The sound expresses contentment. + + hedId + HED_0012400 + + + + Roaring + Loud, deep, or harsh prolonged sounds such as those made by big cats and bears for long-distance communication and intimidation. + + hedId + HED_0012401 + + + + Squawking + Loud, harsh noises such as those made by geese. + + hedId + HED_0012402 + + + + + Named-object-sound + A sound identifiable as coming from a particular type of object. + + hedId + HED_0012403 + + + Alarm-sound + A loud signal often loud continuous ringing to alert people to a problem or condition that requires urgent attention. + + hedId + HED_0012404 + + + + Beep + A short, single tone, that is typically high-pitched and generally made by a computer or other machine. + + hedId + HED_0012405 + + + + Buzz + A persistent vibratory sound often made by a buzzer device and used to indicate something incorrect. + + hedId + HED_0012406 + + + + Click + The sound made by a mechanical cash register, often to designate a reward. + + hedId + HED_0012407 + + + + Ding + A short ringing sound such as that made by a bell, often to indicate a correct response or the expiration of time. + + hedId + HED_0012408 + + + + Horn-blow + A loud sound made by forcing air through a sound device that funnels air to create the sound, often used to sound an alert. + + hedId + HED_0012409 + + + + Ka-ching + The sound made by a mechanical cash register, often to designate a reward. + + hedId + HED_0012410 + + + + Siren + A loud, continuous sound often varying in frequency designed to indicate an emergency. + + hedId + HED_0012411 + + + + + + + Property + Something that pertains to a thing. A characteristic of some entity. A quality or feature regarded as a characteristic or inherent part of someone or something. HED attributes are adjectives or adverbs. + + extensionAllowed + + + hedId + HED_0012412 + + + Agent-property + Something that pertains to or describes an agent. + + hedId + HED_0012413 + + + Agent-state + The state of the agent. + + hedId + HED_0012414 + + + Agent-cognitive-state + The state of the cognitive processes or state of mind of the agent. + + hedId + HED_0012415 + + + Alert + Condition of heightened watchfulness or preparation for action. + + hedId + HED_0012416 + + + + Anesthetized + Having lost sensation to pain or having senses dulled due to the effects of an anesthetic. + + hedId + HED_0012417 + + + + Asleep + Having entered a periodic, readily reversible state of reduced awareness and metabolic activity, usually accompanied by physical relaxation and brain activity. + + hedId + HED_0012418 + + + + Attentive + Concentrating and focusing mental energy on the task or surroundings. + + hedId + HED_0012419 + + + + Awake + In a non sleeping state. + + hedId + HED_0012420 + + + + Brain-dead + Characterized by the irreversible absence of cortical and brain stem functioning. + + hedId + HED_0012421 + + + + Comatose + In a state of profound unconsciousness associated with markedly depressed cerebral activity. + + hedId + HED_0012422 + + + + Distracted + Lacking in concentration because of being preoccupied. + + hedId + HED_0012423 + + + + Drowsy + In a state of near-sleep, a strong desire for sleep, or sleeping for unusually long periods. + + hedId + HED_0012424 + + + + Intoxicated + In a state with disturbed psychophysiological functions and responses as a result of administration or ingestion of a psychoactive substance. + + hedId + HED_0012425 + + + + Locked-in + In a state of complete paralysis of all voluntary muscles except for the ones that control the movements of the eyes. + + hedId + HED_0012426 + + + + Passive + Not responding or initiating an action in response to a stimulus. + + hedId + HED_0012427 + + + + Resting + A state in which the agent is not exhibiting any physical exertion. + + hedId + HED_0012428 + + + + Vegetative + A state of wakefulness and conscience, but (in contrast to coma) with involuntary opening of the eyes and movements (such as teeth grinding, yawning, or thrashing of the extremities). + + hedId + HED_0012429 + + + + + Agent-emotional-state + The status of the general temperament and outlook of an agent. + + hedId + HED_0012430 + + + Angry + Experiencing emotions characterized by marked annoyance or hostility. + + hedId + HED_0012431 + + + + Aroused + In a state reactive to stimuli leading to increased heart rate and blood pressure, sensory alertness, mobility and readiness to respond. + + hedId + HED_0012432 + + + + Awed + Filled with wonder. Feeling grand, sublime or powerful emotions characterized by a combination of joy, fear, admiration, reverence, and/or respect. + + hedId + HED_0012433 + + + + Compassionate + Feeling or showing sympathy and concern for others often evoked for a person who is in distress and associated with altruistic motivation. + + hedId + HED_0012434 + + + + Content + Feeling satisfaction with things as they are. + + hedId + HED_0012435 + + + + Disgusted + Feeling revulsion or profound disapproval aroused by something unpleasant or offensive. + + hedId + HED_0012436 + + + + Emotionally-neutral + Feeling neither satisfied nor dissatisfied. + + hedId + HED_0012437 + + + + Empathetic + Understanding and sharing the feelings of another. Being aware of, being sensitive to, and vicariously experiencing the feelings, thoughts, and experience of another. + + hedId + HED_0012438 + + + + Excited + Feeling great enthusiasm and eagerness. + + hedId + HED_0012439 + + + + Fearful + Feeling apprehension that one may be in danger. + + hedId + HED_0012440 + + + + Frustrated + Feeling annoyed as a result of being blocked, thwarted, disappointed or defeated. + + hedId + HED_0012441 + + + + Grieving + Feeling sorrow in response to loss, whether physical or abstract. + + hedId + HED_0012442 + + + + Happy + Feeling pleased and content. + + hedId + HED_0012443 + + + + Jealous + Feeling threatened by a rival in a relationship with another individual, in particular an intimate partner, usually involves feelings of threat, fear, suspicion, distrust, anxiety, anger, betrayal, and rejection. + + hedId + HED_0012444 + + + + Joyful + Feeling delight or intense happiness. + + hedId + HED_0012445 + + + + Loving + Feeling a strong positive emotion of affection and attraction. + + hedId + HED_0012446 + + + + Relieved + No longer feeling pain, distress,anxiety, or reassured. + + hedId + HED_0012447 + + + + Sad + Feeling grief or unhappiness. + + hedId + HED_0012448 + + + + Stressed + Experiencing mental or emotional strain or tension. + + hedId + HED_0012449 + + + + + Agent-physiological-state + Having to do with the mechanical, physical, or biochemical function of an agent. + + hedId + HED_0012450 + + + Catamenial + Related to menstruation. + + hedId + HED_0013226 + + + + Fever + Body temperature above the normal range. + + relatedTag + Sick + + + hedId + HED_0013227 + + + + Healthy + Having no significant health-related issues. + + relatedTag + Sick + + + hedId + HED_0012451 + + + + Hungry + Being in a state of craving or desiring food. + + relatedTag + Sated + Thirsty + + + hedId + HED_0012452 + + + + Rested + Feeling refreshed and relaxed. + + relatedTag + Tired + + + hedId + HED_0012453 + + + + Sated + Feeling full. + + relatedTag + Hungry + + + hedId + HED_0012454 + + + + Sick + Being in a state of ill health, bodily malfunction, or discomfort. + + relatedTag + Healthy + + + hedId + HED_0012455 + + + + Thirsty + Feeling a need to drink. + + relatedTag + Hungry + + + hedId + HED_0012456 + + + + Tired + Feeling in need of sleep or rest. + + relatedTag + Rested + + + hedId + HED_0012457 + + + + + Agent-postural-state + Pertaining to the position in which agent holds their body. + + hedId + HED_0012458 + + + Crouching + Adopting a position where the knees are bent and the upper body is brought forward and down, sometimes to avoid detection or to defend oneself. + + hedId + HED_0012459 + + + + Eyes-closed + Keeping eyes closed with no blinking. + + hedId + HED_0012460 + + + + Eyes-open + Keeping eyes open with occasional blinking. + + hedId + HED_0012461 + + + + Kneeling + Positioned where one or both knees are on the ground. + + hedId + HED_0012462 + + + + On-treadmill + Ambulation on an exercise apparatus with an endless moving belt to support moving in place. + + hedId + HED_0012463 + + + + Prone + Positioned in a recumbent body position whereby the person lies on its stomach and faces downward. + + hedId + HED_0012464 + + + + Seated-with-chin-rest + Using a device that supports the chin and head. + + hedId + HED_0012465 + + + + Sitting + In a seated position. + + hedId + HED_0012466 + + + + Standing + Assuming or maintaining an erect upright position. + + hedId + HED_0012467 + + + + + + Agent-task-role + The function or part that is ascribed to an agent in performing the task. + + hedId + HED_0012468 + + + Experiment-actor + An agent who plays a predetermined role to create the experiment scenario. + + hedId + HED_0012469 + + + + Experiment-controller + An agent exerting control over some aspect of the experiment. + + hedId + HED_0012470 + + + + Experiment-participant + Someone who takes part in an activity related to an experiment. + + hedId + HED_0012471 + + + + Experimenter + Person who is the owner of the experiment and has its responsibility. + + hedId + HED_0012472 + + + + + Agent-trait + A genetically, environmentally, or socially determined characteristic of an agent. + + hedId + HED_0012473 + + + Age + Length of time elapsed time since birth of the agent. + + hedId + HED_0012474 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012475 + + + + + Agent-experience-level + Amount of skill or knowledge that the agent has as pertains to the task. + + hedId + HED_0012476 + + + Expert-level + Having comprehensive and authoritative knowledge of or skill in a particular area related to the task. + + relatedTag + Intermediate-experience-level + Novice-level + + + hedId + HED_0012477 + + + + Intermediate-experience-level + Having a moderate amount of knowledge or skill related to the task. + + relatedTag + Expert-level + Novice-level + + + hedId + HED_0012478 + + + + Novice-level + Being inexperienced in a field or situation related to the task. + + relatedTag + Expert-level + Intermediate-experience-level + + + hedId + HED_0012479 + + + + + Ethnicity + Belong to a social group that has a common national or cultural tradition. Use with Label to avoid extension. + + hedId + HED_0012480 + + + + Gender + Characteristics that are socially constructed, including norms, behaviors, and roles based on sex. + + hedId + HED_0012481 + + + + Handedness + Individual preference for use of a hand, known as the dominant hand. + + hedId + HED_0012482 + + + Ambidextrous + Having no overall dominance in the use of right or left hand or foot in the performance of tasks that require one hand or foot. + + hedId + HED_0012483 + + + + Left-handed + Preference for using the left hand or foot for tasks requiring the use of a single hand or foot. + + hedId + HED_0012484 + + + + Right-handed + Preference for using the right hand or foot for tasks requiring the use of a single hand or foot. + + hedId + HED_0012485 + + + + + Race + Belonging to a group sharing physical or social qualities as defined within a specified society. Use with Label to avoid extension. + + hedId + HED_0012486 + + + + Sex + Physical properties or qualities by which male is distinguished from female. + + hedId + HED_0012487 + + + Female + Biological sex of an individual with female sexual organs such ova. + + hedId + HED_0012488 + + + + Intersex + Having genitalia and/or secondary sexual characteristics of indeterminate sex. + + hedId + HED_0012489 + + + + Male + Biological sex of an individual with male sexual organs producing sperm. + + hedId + HED_0012490 + + + + Other-sex + A non-specific designation of sexual traits. + + hedId + HED_0012491 + + + + + + + Data-property + Something that pertains to data or information. + + extensionAllowed + + + hedId + HED_0012492 + + + Data-artifact + An anomalous, interfering, or distorting signal originating from a source other than the item being studied. + + hedId + HED_0012493 + + + Biological-artifact + A data artifact arising from a biological entity being measured. + + hedId + HED_0012494 + + + Chewing-artifact + Artifact from moving the jaw in a chewing motion. + + hedId + HED_0012495 + + + + ECG-artifact + An electrical artifact from the far-field potential from pulsation of the heart, time locked to QRS complex. + + hedId + HED_0012496 + + + + EMG-artifact + Artifact from muscle activity and myogenic potentials at the measurements site. In EEG, myogenic potentials are the most common artifacts. Frontalis and temporalis muscles (e.g. clenching of jaw muscles) are common causes. Generally, the potentials generated in the muscles are of shorter duration than those generated in the brain. The frequency components are usually beyond 30-50 Hz, and the bursts are arrhythmic. + + hedId + HED_0012497 + + + + Eye-artifact + Ocular movements and blinks can result in artifacts in different types of data. In electrophysiology data, these can result transients and offsets the signal. + + hedId + HED_0012498 + + + Eye-blink-artifact + Artifact from eye blinking. In EEG, Fp1/Fp2 electrodes become electro-positive with eye closure because the cornea is positively charged causing a negative deflection in Fp1/Fp2. If the eye blink is unilateral, consider prosthetic eye. + + hedId + HED_0012499 + + + + Eye-movement-artifact + Eye movements can cause artifacts on recordings. The charge of the eye can especially cause artifacts in electrophysiology data. + + hedId + HED_0012500 + + + Horizontal-eye-movement-artifact + Artifact from moving eyes left-to-right and right-to-left. In EEG, there is an upward deflection in the Fp2-F8 derivation, when the eyes move to the right side. In this case F8 becomes more positive and therefore. When the eyes move to the left, F7 becomes more positive and there is an upward deflection in the Fp1-F7 derivation. + + hedId + HED_0012501 + + + + Nystagmus-artifact + Artifact from nystagmus (a vision condition in which the eyes make repetitive, uncontrolled movements). + + hedId + HED_0012502 + + + + Slow-eye-movement-artifact + Artifacts originating from slow, rolling eye-movements, seen during drowsiness. + + hedId + HED_0012503 + + + + Vertical-eye-movement-artifact + Artifact from moving eyes up and down. In EEG, this causes positive potentials (50-100 micro V) with bi-frontal distribution, maximum at Fp1 and Fp2, when the eyeball rotates upward. The downward rotation of the eyeball is associated with the negative deflection. The time course of the deflections is similar to the time course of the eyeball movement. + + hedId + HED_0012504 + + + + + + Movement-artifact + Artifact in the measured data generated by motion of the subject. + + hedId + HED_0012505 + + + + Pulse-artifact + A mechanical artifact from a pulsating blood vessel near a measurement site, cardio-ballistic artifact. + + hedId + HED_0012506 + + + + Respiration-artifact + Artifact from breathing. + + hedId + HED_0012507 + + + + Rocking-patting-artifact + Quasi-rhythmical artifacts in recordings most commonly seen in infants. Typically caused by a caregiver rocking or patting the infant. + + hedId + HED_0012508 + + + + Sucking-artifact + Artifact from sucking, typically seen in very young cases. + + hedId + HED_0012509 + + + + Sweat-artifact + Artifact from sweating. In EEG, this is a low amplitude undulating waveform that is usually greater than 2 seconds and may appear to be an unstable baseline. + + hedId + HED_0012510 + + + + Tongue-movement-artifact + Artifact from tongue movement (Glossokinetic). The tongue functions as a dipole, with the tip negative with respect to the base. In EEG, the artifact produced by the tongue has a broad potential field that drops from frontal to occipital areas, although it is less steep than that produced by eye movement artifacts. The amplitude of the potentials is greater inferiorly than in parasagittal regions; the frequency is variable but usually in the delta range. Chewing and sucking can produce similar artifacts. + + hedId + HED_0012511 + + + + + Nonbiological-artifact + A data artifact arising from a non-biological source. + + hedId + HED_0012512 + + + Artificial-ventilation-artifact + Artifact stemming from mechanical ventilation. These can occur at the same rate as the ventilator, but also have other patterns. + + hedId + HED_0012513 + + + + Dialysis-artifact + Artifacts seen in recordings during continuous renal replacement therapy (dialysis). + + hedId + HED_0012514 + + + + Electrode-movement-artifact + Artifact from electrode movement. + + hedId + HED_0012515 + + + + Electrode-pops-artifact + Brief artifact with a steep rise and slow fall of an electrophysiological signal, most often caused by a loose electrode. + + hedId + HED_0012516 + + + + Induction-artifact + Artifacts induced by nearby equipment. In EEG, these are usually of high frequency. + + hedId + HED_0012517 + + + + Line-noise-artifact + Power line noise at 50 Hz or 60 Hz. + + hedId + HED_0012518 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0012519 + + + + + Salt-bridge-artifact + Artifact from salt-bridge between EEG electrodes. + + hedId + HED_0012520 + + + + + + Data-marker + An indicator placed to mark something. + + hedId + HED_0012521 + + + Data-break-marker + An indicator place to indicate a gap in the data. + + hedId + HED_0012522 + + + + Temporal-marker + An indicator placed at a particular time in the data. + + hedId + HED_0012523 + + + Inset + Marks an intermediate point in an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Offset + + + hedId + HED_0012524 + + + + Offset + Marks the end of an event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Onset + Inset + + + hedId + HED_0012525 + + + + Onset + Marks the start of an ongoing event of temporal extent. + + topLevelTagGroup + + + reserved + + + relatedTag + Inset + Offset + + + hedId + HED_0012526 + + + + Pause + Indicates the temporary interruption of the operation of a process and subsequently a wait for a signal to continue. + + hedId + HED_0012527 + + + + Time-out + A cancellation or cessation that automatically occurs when a predefined interval of time has passed without a certain event occurring. + + hedId + HED_0012528 + + + + Time-sync + A synchronization signal whose purpose is to help synchronize different signals or processes. Often used to indicate a marker inserted into the recorded data to allow post hoc synchronization of concurrently recorded data streams. + + hedId + HED_0012529 + + + + + + Data-resolution + Smallest change in a quality being measured by an sensor that causes a perceptible change. + + hedId + HED_0012530 + + + Printer-resolution + Resolution of a printer, usually expressed as the number of dots-per-inch for a printer. + + hedId + HED_0012531 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012532 + + + + + Screen-resolution + Resolution of a screen, usually expressed as the of pixels in a dimension for a digital display device. + + hedId + HED_0012533 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012534 + + + + + Sensory-resolution + Resolution of measurements by a sensing device. + + hedId + HED_0012535 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012536 + + + + + Spatial-resolution + Linear spacing of a spatial measurement. + + hedId + HED_0012537 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012538 + + + + + Spectral-resolution + Measures the ability of a sensor to resolve features in the electromagnetic spectrum. + + hedId + HED_0012539 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012540 + + + + + Temporal-resolution + Measures the ability of a sensor to resolve features in time. + + hedId + HED_0012541 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012542 + + + + + + Data-source-type + The type of place, person, or thing from which the data comes or can be obtained. + + hedId + HED_0012543 + + + Computed-feature + A feature computed from the data by a tool. This tag should be grouped with a label of the form Toolname_propertyName. + + hedId + HED_0012544 + + + + Computed-prediction + A computed extrapolation of known data. + + hedId + HED_0012545 + + + + Expert-annotation + An explanatory or critical comment or other in-context information provided by an authority. + + hedId + HED_0012546 + + + + Instrument-measurement + Information obtained from a device that is used to measure material properties or make other observations. + + hedId + HED_0012547 + + + + Observation + Active acquisition of information from a primary source. Should be grouped with a label of the form AgentID_featureName. + + hedId + HED_0012548 + + + + + Data-value + Designation of the type of a data item. + + hedId + HED_0012549 + + + Categorical-value + Indicates that something can take on a limited and usually fixed number of possible values. + + hedId + HED_0012550 + + + Categorical-class-value + Categorical values that fall into discrete classes such as true or false. The grouping is absolute in the sense that it is the same for all participants. + + hedId + HED_0012551 + + + All + To a complete degree or to the full or entire extent. + + relatedTag + Some + None + + + hedId + HED_0012552 + + + + Correct + Free from error. Especially conforming to fact or truth. + + relatedTag + Wrong + + + hedId + HED_0012553 + + + + Explicit + Stated clearly and in detail, leaving no room for confusion or doubt. + + relatedTag + Implicit + + + hedId + HED_0012554 + + + + False + Not in accordance with facts, reality or definitive criteria. + + relatedTag + True + + + hedId + HED_0012555 + + + + Implicit + Implied though not plainly expressed. + + relatedTag + Explicit + + + hedId + HED_0012556 + + + + Invalid + Not allowed or not conforming to the correct format or specifications. + + relatedTag + Valid + + + hedId + HED_0012557 + + + + None + No person or thing, nobody, not any. + + relatedTag + All + Some + + + hedId + HED_0012558 + + + + Some + At least a small amount or number of, but not a large amount of, or often. + + relatedTag + All + None + + + hedId + HED_0012559 + + + + True + Conforming to facts, reality or definitive criteria. + + relatedTag + False + + + hedId + HED_0012560 + + + + Unknown + The information has not been provided. + + relatedTag + Invalid + + + hedId + HED_0012561 + + + + Valid + Allowable, usable, or acceptable. + + relatedTag + Invalid + + + hedId + HED_0012562 + + + + Wrong + Inaccurate or not correct. + + relatedTag + Correct + + + hedId + HED_0012563 + + + + + Categorical-judgment-value + Categorical values that are based on the judgment or perception of the participant such familiar and famous. + + hedId + HED_0012564 + + + Abnormal + Deviating in any way from the state, position, structure, condition, behavior, or rule which is considered a norm. + + relatedTag + Normal + + + hedId + HED_0012565 + + + + Asymmetrical + Lacking symmetry or having parts that fail to correspond to one another in shape, size, or arrangement. + + relatedTag + Symmetrical + + + hedId + HED_0012566 + + + + Audible + A sound that can be perceived by the participant. + + relatedTag + Inaudible + + + hedId + HED_0012567 + + + + Complex + Hard, involved or complicated, elaborate, having many parts. + + relatedTag + Simple + + + hedId + HED_0012568 + + + + Congruent + Concordance of multiple evidence lines. In agreement or harmony. + + relatedTag + Incongruent + + + hedId + HED_0012569 + + + + Constrained + Keeping something within particular limits or bounds. + + relatedTag + Unconstrained + + + hedId + HED_0012570 + + + + Disordered + Not neatly arranged. Confused and untidy. A structural quality in which the parts of an object are non-rigid. + + relatedTag + Ordered + + + hedId + HED_0012571 + + + + Familiar + Recognized, familiar, or within the scope of knowledge. + + relatedTag + Unfamiliar + Famous + + + hedId + HED_0012572 + + + + Famous + A person who has a high degree of recognition by the general population for his or her success or accomplishments. A famous person. + + relatedTag + Familiar + Unfamiliar + + + hedId + HED_0012573 + + + + Inaudible + A sound below the threshold of perception of the participant. + + relatedTag + Audible + + + hedId + HED_0012574 + + + + Incongruent + Not in agreement or harmony. + + relatedTag + Congruent + + + hedId + HED_0012575 + + + + Involuntary + An action that is not made by choice. In the body, involuntary actions (such as blushing) occur automatically, and cannot be controlled by choice. + + relatedTag + Voluntary + + + hedId + HED_0012576 + + + + Masked + Information exists but is not provided or is partially obscured due to security,privacy, or other concerns. + + relatedTag + Unmasked + + + hedId + HED_0012577 + + + + Normal + Being approximately average or within certain limits. Conforming with or constituting a norm or standard or level or type or social norm. + + relatedTag + Abnormal + + + hedId + HED_0012578 + + + + Ordered + Conforming to a logical or comprehensible arrangement of separate elements. + + relatedTag + Disordered + + + hedId + HED_0012579 + + + + Simple + Easily understood or presenting no difficulties. + + relatedTag + Complex + + + hedId + HED_0012580 + + + + Symmetrical + Made up of exactly similar parts facing each other or around an axis. Showing aspects of symmetry. + + relatedTag + Asymmetrical + + + hedId + HED_0012581 + + + + Unconstrained + Moving without restriction. + + relatedTag + Constrained + + + hedId + HED_0012582 + + + + Unfamiliar + Not having knowledge or experience of. + + relatedTag + Familiar + Famous + + + hedId + HED_0012583 + + + + Unmasked + Information is revealed. + + relatedTag + Masked + + + hedId + HED_0012584 + + + + Voluntary + Using free will or design; not forced or compelled; controlled by individual volition. + + relatedTag + Involuntary + + + hedId + HED_0012585 + + + + + Categorical-level-value + Categorical values based on dividing a continuous variable into levels such as high and low. + + hedId + HED_0012586 + + + Cold + Having an absence of heat. + + relatedTag + Hot + + + hedId + HED_0012587 + + + + Deep + Extending relatively far inward or downward. + + relatedTag + Shallow + + + hedId + HED_0012588 + + + + High + Having a greater than normal degree, intensity, or amount. + + relatedTag + Low + Medium + + + hedId + HED_0012589 + + + + Hot + Having an excess of heat. + + relatedTag + Cold + + + hedId + HED_0012590 + + + + Large + Having a great extent such as in physical dimensions, period of time, amplitude or frequency. + + relatedTag + Small + + + hedId + HED_0012591 + + + + Liminal + Situated at a sensory threshold that is barely perceptible or capable of eliciting a response. + + relatedTag + Subliminal + Supraliminal + + + hedId + HED_0012592 + + + + Loud + Having a perceived high intensity of sound. + + relatedTag + Quiet + + + hedId + HED_0012593 + + + + Low + Less than normal in degree, intensity or amount. + + relatedTag + High + + + hedId + HED_0012594 + + + + Medium + Mid-way between small and large in number, quantity, magnitude or extent. + + relatedTag + Low + High + + + hedId + HED_0012595 + + + + Negative + Involving disadvantage or harm. + + relatedTag + Positive + + + hedId + HED_0012596 + + + + Positive + Involving advantage or good. + + relatedTag + Negative + + + hedId + HED_0012597 + + + + Quiet + Characterizing a perceived low intensity of sound. + + relatedTag + Loud + + + hedId + HED_0012598 + + + + Rough + Having a surface with perceptible bumps, ridges, or irregularities. + + relatedTag + Smooth + + + hedId + HED_0012599 + + + + Shallow + Having a depth which is relatively low. + + relatedTag + Deep + + + hedId + HED_0012600 + + + + Small + Having a small extent such as in physical dimensions, period of time, amplitude or frequency. + + relatedTag + Large + + + hedId + HED_0012601 + + + + Smooth + Having a surface free from bumps, ridges, or irregularities. + + relatedTag + Rough + + + hedId + HED_0012602 + + + + Subliminal + Situated below a sensory threshold that is imperceptible or not capable of eliciting a response. + + relatedTag + Liminal + Supraliminal + + + hedId + HED_0012603 + + + + Supraliminal + Situated above a sensory threshold that is perceptible or capable of eliciting a response. + + relatedTag + Liminal + Subliminal + + + hedId + HED_0012604 + + + + Thick + Wide in width, extent or cross-section. + + relatedTag + Thin + + + hedId + HED_0012605 + + + + Thin + Narrow in width, extent or cross-section. + + relatedTag + Thick + + + hedId + HED_0012606 + + + + + Categorical-location-value + Value indicating the location of something, primarily as an identifier rather than an expression of where the item is relative to something else. + + hedId + HED_0012607 + + + Anterior + Relating to an item on the front of an agent body (from the point of view of the agent) or on the front of an object from the point of view of an agent. This pertains to the identity of an agent or a thing. + + hedId + HED_0012608 + + + + Lateral + Identifying the portion of an object away from the midline, particularly applied to the (anterior-posterior, superior-inferior) surface of a brain. + + hedId + HED_0012609 + + + + Left + Relating to an item on the left side of an agent body (from the point of view of the agent) or the left side of an object from the point of view of an agent. This pertains to the identity of an agent or a thing, for example (Left, Hand) as an identifier for the left hand. HED spatial relations should be used for relative positions such as (Hand, (Left-side-of, Keyboard)), which denotes the hand placed on the left side of the keyboard, which could be either the identified left hand or right hand. + + hedId + HED_0012610 + + + + Medial + Identifying the portion of an object towards the center, particularly applied to the (anterior-posterior, superior-inferior) surface of a brain. + + hedId + HED_0012611 + + + + Posterior + Relating to an item on the back of an agent body (from the point of view of the agent) or on the back of an object from the point of view of an agent. This pertains to the identity of an agent or a thing. + + hedId + HED_0012612 + + + + Right + Relating to an item on the right side of an agent body (from the point of view of the agent) or the right side of an object from the point of view of an agent. This pertains to the identity of an agent or a thing, for example (Right, Hand) as an identifier for the right hand. HED spatial relations should be used for relative positions such as (Hand, (Right-side-of, Keyboard)), which denotes the hand placed on the right side of the keyboard, which could be either the identified left hand or right hand. + + hedId + HED_0012613 + + + + + Categorical-orientation-value + Value indicating the orientation or direction of something. + + hedId + HED_0012614 + + + Backward + Directed behind or to the rear. + + relatedTag + Forward + + + hedId + HED_0012615 + + + + Downward + Moving or leading toward a lower place or level. + + relatedTag + Leftward + Rightward + Upward + + + hedId + HED_0012616 + + + + Forward + At or near or directed toward the front. + + relatedTag + Backward + + + hedId + HED_0012617 + + + + Horizontally-oriented + Oriented parallel to or in the plane of the horizon. + + relatedTag + Vertically-oriented + + + hedId + HED_0012618 + + + + Leftward + Going toward or facing the left. + + relatedTag + Downward + Rightward + Upward + + + hedId + HED_0012619 + + + + Oblique + Slanting or inclined in direction, course, or position that is neither parallel nor perpendicular nor right-angular. + + relatedTag + Rotated + + + hedId + HED_0012620 + + + + Rightward + Going toward or situated on the right. + + relatedTag + Downward + Leftward + Upward + + + hedId + HED_0012621 + + + + Rotated + Positioned offset around an axis or center. + + hedId + HED_0012622 + + + + Upward + Moving, pointing, or leading to a higher place, point, or level. + + relatedTag + Downward + Leftward + Rightward + + + hedId + HED_0012623 + + + + Vertically-oriented + Oriented perpendicular to the plane of the horizon. + + relatedTag + Horizontally-oriented + + + hedId + HED_0012624 + + + + + + Physical-value + The value of some physical property of something. + + hedId + HED_0012625 + + + Temperature + A measure of hot or cold based on the average kinetic energy of the atoms or molecules in the system. + + hedId + HED_0012626 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + temperatureUnits + + + hedId + HED_0012627 + + + + + Weight + The relative mass or the quantity of matter contained by something. + + hedId + HED_0012628 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + weightUnits + + + hedId + HED_0012629 + + + + + + Quantitative-value + Something capable of being estimated or expressed with numeric values. + + hedId + HED_0012630 + + + Fraction + A numerical value between 0 and 1. + + hedId + HED_0012631 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012632 + + + + + Item-count + The integer count of something which is usually grouped with the entity it is counting. (Item-count/3, A) indicates that 3 of A have occurred up to this point. + + hedId + HED_0012633 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012634 + + + + + Item-index + The index of an item in a collection, sequence or other structure. (A (Item-index/3, B)) means that A is item number 3 in B. + + hedId + HED_0012635 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012636 + + + + + Item-interval + An integer indicating how many items or entities have passed since the last one of these. An item interval of 0 indicates the current item. + + hedId + HED_0012637 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012638 + + + + + Percentage + A fraction or ratio with 100 understood as the denominator. + + hedId + HED_0012639 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012640 + + + + + Ratio + A quotient of quantities of the same kind for different components within the same system. + + hedId + HED_0012641 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012642 + + + + + + Spatiotemporal-value + A property relating to space and/or time. + + hedId + HED_0012643 + + + Rate-of-change + The amount of change accumulated per unit time. + + hedId + HED_0012644 + + + Acceleration + Magnitude of the rate of change in either speed or direction. The direction of change should be given separately. + + hedId + HED_0012645 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + accelerationUnits + + + hedId + HED_0012646 + + + + + Frequency + Frequency is the number of occurrences of a repeating event per unit time. + + hedId + HED_0012647 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0012648 + + + + + Jerk-rate + Magnitude of the rate at which the acceleration of an object changes with respect to time. The direction of change should be given separately. + + hedId + HED_0012649 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + jerkUnits + + + hedId + HED_0012650 + + + + + Refresh-rate + The frequency with which the image on a computer monitor or similar electronic display screen is refreshed, usually expressed in hertz. + + hedId + HED_0012651 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012652 + + + + + Sampling-rate + The number of digital samples taken or recorded per unit of time. + + hedId + HED_0012653 + + + # + + takesValue + + + unitClass + frequencyUnits + + + hedId + HED_0012654 + + + + + Speed + A scalar measure of the rate of movement of the object expressed either as the distance traveled divided by the time taken (average speed) or the rate of change of position with respect to time at a particular point (instantaneous speed). The direction of change should be given separately. + + hedId + HED_0012655 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + speedUnits + + + hedId + HED_0012656 + + + + + Temporal-rate + The number of items per unit of time. + + hedId + HED_0012657 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0012658 + + + + + + Spatial-value + Value of an item involving space. + + hedId + HED_0012659 + + + Angle + The amount of inclination of one line to another or the plane of one object to another. + + hedId + HED_0012660 + + + # + + takesValue + + + unitClass + angleUnits + + + valueClass + numericClass + + + hedId + HED_0012661 + + + + + Distance + A measure of the space separating two objects or points. + + hedId + HED_0012662 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012663 + + + + + Position + A reference to the alignment of an object, a particular situation or view of a situation, or the location of an object. Coordinates with respect a specified frame of reference or the default Screen-frame if no frame is given. + + hedId + HED_0012664 + + + Clock-face + A location identifier based on clock-face numbering or anatomic subregion. Replaced by Clock-face-position. + + deprecatedFrom + 8.2.0 + + + hedId + HED_0012326 + + + # + + deprecatedFrom + 8.2.0 + + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013228 + + + + + Clock-face-position + A location identifier based on clock-face numbering or anatomic subregion. As an object, just use the tag Clock. + + hedId + HED_0013229 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013230 + + + + + X-position + The position along the x-axis of the frame of reference. + + hedId + HED_0012665 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012666 + + + + + Y-position + The position along the y-axis of the frame of reference. + + hedId + HED_0012667 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012668 + + + + + Z-position + The position along the z-axis of the frame of reference. + + hedId + HED_0012669 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012670 + + + + + + Size + The physical magnitude of something. + + hedId + HED_0012671 + + + Area + The extent of a 2-dimensional surface enclosed within a boundary. + + hedId + HED_0012672 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + areaUnits + + + hedId + HED_0012673 + + + + + Depth + The distance from the surface of something especially from the perspective of looking from the front. + + hedId + HED_0012674 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012675 + + + + + Height + The vertical measurement or distance from the base to the top of an object. + + hedId + HED_0012676 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012677 + + + + + Length + The linear extent in space from one end of something to the other end, or the extent of something from beginning to end. + + hedId + HED_0012678 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012679 + + + + + Perimeter + The minimum length of paths enclosing a 2D shape. + + hedId + HED_0012680 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012681 + + + + + Radius + The distance of the line from the center of a circle or a sphere to its perimeter or outer surface, respectively. + + hedId + HED_0012682 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012683 + + + + + Volume + The amount of three dimensional space occupied by an object or the capacity of a space or container. + + hedId + HED_0012684 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + volumeUnits + + + hedId + HED_0012685 + + + + + Width + The extent or measurement of something from side to side. + + hedId + HED_0012686 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + physicalLengthUnits + + + hedId + HED_0012687 + + + + + + + Temporal-value + A characteristic of or relating to time or limited by time. + + hedId + HED_0012688 + + + Delay + The time at which an event start time is delayed from the current onset time. This tag defines the start time of an event of temporal extent and may be used with the Duration tag. + + topLevelTagGroup + + + reserved + + + requireChild + + + relatedTag + Duration + + + hedId + HED_0012689 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012690 + + + + + Duration + The period of time during which an event occurs. This tag defines the end time of an event of temporal extent and may be used with the Delay tag. + + topLevelTagGroup + + + reserved + + + requireChild + + + relatedTag + Delay + + + hedId + HED_0012691 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012692 + + + + + Time-interval + The period of time separating two instances, events, or occurrences. + + hedId + HED_0012693 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012694 + + + + + Time-value + A value with units of time. Usually grouped with tags identifying what the value represents. + + hedId + HED_0012695 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012696 + + + + + + + Statistical-value + A value based on or employing the principles of statistics. + + extensionAllowed + + + hedId + HED_0012697 + + + Data-maximum + The largest possible quantity or degree. + + hedId + HED_0012698 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012699 + + + + + Data-mean + The sum of a set of values divided by the number of values in the set. + + hedId + HED_0012700 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012701 + + + + + Data-median + The value which has an equal number of values greater and less than it. + + hedId + HED_0012702 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012703 + + + + + Data-minimum + The smallest possible quantity. + + hedId + HED_0012704 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012705 + + + + + Probability + A measure of the expectation of the occurrence of a particular event. + + hedId + HED_0012706 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012707 + + + + + Standard-deviation + A measure of the range of values in a set of numbers. Standard deviation is a statistic used as a measure of the dispersion or variation in a distribution, equal to the square root of the arithmetic mean of the squares of the deviations from the arithmetic mean. + + hedId + HED_0012708 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012709 + + + + + Statistical-accuracy + A measure of closeness to true value expressed as a number between 0 and 1. + + hedId + HED_0012710 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012711 + + + + + Statistical-precision + A quantitative representation of the degree of accuracy necessary for or associated with a particular action. + + hedId + HED_0012712 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012713 + + + + + Statistical-recall + Sensitivity is a measurement datum qualifying a binary classification test and is computed by subtracting the false negative rate to the integral numeral 1. + + hedId + HED_0012714 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012715 + + + + + Statistical-uncertainty + A measure of the inherent variability of repeated observation measurements of a quantity including quantities evaluated by statistical methods and by other means. + + hedId + HED_0012716 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0012717 + + + + + + + Data-variability-attribute + An attribute describing how something changes or varies. + + hedId + HED_0012718 + + + Abrupt + Marked by sudden change. + + hedId + HED_0012719 + + + + Constant + Continually recurring or continuing without interruption. Not changing in time or space. + + hedId + HED_0012720 + + + + Continuous + Uninterrupted in time, sequence, substance, or extent. + + relatedTag + Discrete + Discontinuous + + + hedId + HED_0012721 + + + + Decreasing + Becoming smaller or fewer in size, amount, intensity, or degree. + + relatedTag + Increasing + + + hedId + HED_0012722 + + + + Deterministic + No randomness is involved in the development of the future states of the element. + + relatedTag + Random + Stochastic + + + hedId + HED_0012723 + + + + Discontinuous + Having a gap in time, sequence, substance, or extent. + + relatedTag + Continuous + + + hedId + HED_0012724 + + + + Discrete + Constituting a separate entities or parts. + + relatedTag + Continuous + Discontinuous + + + hedId + HED_0012725 + + + + Estimated-value + Something that has been calculated or measured approximately. + + hedId + HED_0012726 + + + + Exact-value + A value that is viewed to the true value according to some standard. + + hedId + HED_0012727 + + + + Flickering + Moving irregularly or unsteadily or burning or shining fitfully or with a fluctuating light. + + hedId + HED_0012728 + + + + Fractal + Having extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size. + + hedId + HED_0012729 + + + + Increasing + Becoming greater in size, amount, or degree. + + relatedTag + Decreasing + + + hedId + HED_0012730 + + + + Random + Governed by or depending on chance. Lacking any definite plan or order or purpose. + + relatedTag + Deterministic + Stochastic + + + hedId + HED_0012731 + + + + Repetitive + A recurring action that is often non-purposeful. + + hedId + HED_0012732 + + + + Stochastic + Uses a random probability distribution or pattern that may be analyzed statistically but may not be predicted precisely to determine future states. + + relatedTag + Deterministic + Random + + + hedId + HED_0012733 + + + + Varying + Differing in size, amount, degree, or nature. + + hedId + HED_0012734 + + + + + + Environmental-property + Relating to or arising from the surroundings of an agent. + + hedId + HED_0012735 + + + Augmented-reality + Using technology that enhances real-world experiences with computer-derived digital overlays to change some aspects of perception of the natural environment. The digital content is shown to the user through a smart device or glasses and responds to changes in the environment. + + hedId + HED_0012736 + + + + Indoors + Located inside a building or enclosure. + + hedId + HED_0012737 + + + + Motion-platform + A mechanism that creates the feelings of being in a real motion environment. + + hedId + HED_0012738 + + + + Outdoors + Any area outside a building or shelter. + + hedId + HED_0012739 + + + + Real-world + Located in a place that exists in real space and time under realistic conditions. + + hedId + HED_0012740 + + + + Rural + Of or pertaining to the country as opposed to the city. + + hedId + HED_0012741 + + + + Terrain + Characterization of the physical features of a tract of land. + + hedId + HED_0012742 + + + Composite-terrain + Tracts of land characterized by a mixture of physical features. + + hedId + HED_0012743 + + + + Dirt-terrain + Tracts of land characterized by a soil surface and lack of vegetation. + + hedId + HED_0012744 + + + + Grassy-terrain + Tracts of land covered by grass. + + hedId + HED_0012745 + + + + Gravel-terrain + Tracts of land covered by a surface consisting a loose aggregation of small water-worn or pounded stones. + + hedId + HED_0012746 + + + + Leaf-covered-terrain + Tracts of land covered by leaves and composited organic material. + + hedId + HED_0012747 + + + + Muddy-terrain + Tracts of land covered by a liquid or semi-liquid mixture of water and some combination of soil, silt, and clay. + + hedId + HED_0012748 + + + + Paved-terrain + Tracts of land covered with concrete, asphalt, stones, or bricks. + + hedId + HED_0012749 + + + + Rocky-terrain + Tracts of land consisting or full of rock or rocks. + + hedId + HED_0012750 + + + + Sloped-terrain + Tracts of land arranged in a sloping or inclined position. + + hedId + HED_0012751 + + + + Uneven-terrain + Tracts of land that are not level, smooth, or regular. + + hedId + HED_0012752 + + + + + Urban + Relating to, located in, or characteristic of a city or densely populated area. + + hedId + HED_0012753 + + + + Virtual-world + Using technology that creates immersive, computer-generated experiences that a person can interact with and navigate through. The digital content is generally delivered to the user through some type of headset and responds to changes in head position or through interaction with other types of sensors. Existing in a virtual setting such as a simulation or game environment. + + hedId + HED_0012754 + + + + + Informational-property + Something that pertains to a task. + + extensionAllowed + + + hedId + HED_0012755 + + + Description + An explanation of what the tag group it is in means. If the description is at the top-level of an event string, the description applies to the event. + + hedId + HED_0012756 + + + # + + takesValue + + + valueClass + textClass + + + hedId + HED_0012757 + + + + + ID + An alphanumeric name that identifies either a unique object or a unique class of objects. Here the object or class may be an idea, physical countable object (or class), or physical uncountable substance (or class). + + hedId + HED_0012758 + + + # + + takesValue + + + valueClass + textClass + + + hedId + HED_0012759 + + + + + Label + A string of 20 or fewer characters identifying something. Labels usually refer to general classes of things while IDs refer to specific instances. A term that is associated with some entity. A brief description given for purposes of identification. An identifying or descriptive marker that is attached to an object. + + hedId + HED_0012760 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012761 + + + + + Metadata + Data about data. Information that describes another set of data. + + hedId + HED_0012762 + + + Creation-date + The date on which the creation of this item began. + + hedId + HED_0012763 + + + # + + takesValue + + + valueClass + dateTimeClass + + + hedId + HED_0012764 + + + + + Experimental-note + A brief written record about the experiment. + + hedId + HED_0012765 + + + # + + takesValue + + + valueClass + textClass + + + hedId + HED_0012766 + + + + + Library-name + Official name of a HED library. + + hedId + HED_0012767 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012768 + + + + + Metadata-identifier + Identifier (usually unique) from another metadata source. + + hedId + HED_0012769 + + + CogAtlas + The Cognitive Atlas ID number of something. + + hedId + HED_0012770 + + + # + + takesValue + + + hedId + HED_0012771 + + + + + CogPo + The CogPO ID number of something. + + hedId + HED_0012772 + + + # + + takesValue + + + hedId + HED_0012773 + + + + + DOI + Digital object identifier for an object. + + hedId + HED_0012774 + + + # + + takesValue + + + hedId + HED_0012775 + + + + + OBO-identifier + The identifier of a term in some Open Biology Ontology (OBO) ontology. + + hedId + HED_0012776 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012777 + + + + + Species-identifier + A binomial species name from the NCBI Taxonomy, for example, homo sapiens, mus musculus, or rattus norvegicus. + + hedId + HED_0012778 + + + # + + takesValue + + + hedId + HED_0012779 + + + + + Subject-identifier + A sequence of characters used to identify, name, or characterize a trial or study subject. + + hedId + HED_0012780 + + + # + + takesValue + + + hedId + HED_0012781 + + + + + UUID + A unique universal identifier. + + hedId + HED_0012782 + + + # + + takesValue + + + hedId + HED_0012783 + + + + + Version-identifier + An alphanumeric character string that identifies a form or variant of a type or original. + + hedId + HED_0012784 + + + # + Usually is a semantic version. + + takesValue + + + hedId + HED_0012785 + + + + + + Modified-date + The date on which the item was modified (usually the last-modified data unless a complete record of dated modifications is kept. + + hedId + HED_0012786 + + + # + + takesValue + + + valueClass + dateTimeClass + + + hedId + HED_0012787 + + + + + Pathname + The specification of a node (file or directory) in a hierarchical file system, usually specified by listing the nodes top-down. + + hedId + HED_0012788 + + + # + + takesValue + + + hedId + HED_0012789 + + + + + URL + A valid URL. + + hedId + HED_0012790 + + + # + + takesValue + + + hedId + HED_0012791 + + + + + + Parameter + Something user-defined for this experiment. + + hedId + HED_0012792 + + + Parameter-label + The name of the parameter. + + hedId + HED_0012793 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012794 + + + + + Parameter-value + The value of the parameter. + + hedId + HED_0012795 + + + # + + takesValue + + + valueClass + textClass + + + hedId + HED_0012796 + + + + + + + Organizational-property + Relating to an organization or the action of organizing something. + + hedId + HED_0012797 + + + Collection + A tag designating a grouping of items such as in a set or list. + + reserved + + + hedId + HED_0012798 + + + # + Name of the collection. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012799 + + + + + Condition-variable + An aspect of the experiment or task that is to be varied during the experiment. Task-conditions are sometimes called independent variables or contrasts. + + reserved + + + hedId + HED_0012800 + + + # + Name of the condition variable. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012801 + + + + + Control-variable + An aspect of the experiment that is fixed throughout the study and usually is explicitly controlled. + + reserved + + + hedId + HED_0012802 + + + # + Name of the control variable. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012803 + + + + + Def + A HED-specific utility tag used with a defined name to represent the tags associated with that definition. + + requireChild + + + reserved + + + hedId + HED_0012804 + + + # + Name of the definition. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012805 + + + + + Def-expand + A HED specific utility tag that is grouped with an expanded definition. The child value of the Def-expand is the name of the expanded definition. + + requireChild + + + reserved + + + tagGroup + + + hedId + HED_0012806 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012807 + + + + + Definition + A HED-specific utility tag whose child value is the name of the concept and the tag group associated with the tag is an English language explanation of a concept. + + requireChild + + + reserved + + + topLevelTagGroup + + + hedId + HED_0012808 + + + # + Name of the definition. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012809 + + + + + Event-context + A special HED tag inserted as part of a top-level tag group to contain information about the interrelated conditions under which the event occurs. The event context includes information about other events that are ongoing when this event happens. + + reserved + + + topLevelTagGroup + + + unique + + + hedId + HED_0012810 + + + + Event-stream + A special HED tag indicating that this event is a member of an ordered succession of events. + + reserved + + + hedId + HED_0012811 + + + # + Name of the event stream. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012812 + + + + + Experimental-intertrial + A tag used to indicate a part of the experiment between trials usually where nothing is happening. + + reserved + + + hedId + HED_0012813 + + + # + Optional label for the intertrial block. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012814 + + + + + Experimental-trial + Designates a run or execution of an activity, for example, one execution of a script. A tag used to indicate a particular organizational part in the experimental design often containing a stimulus-response pair or stimulus-response-feedback triad. + + reserved + + + hedId + HED_0012815 + + + # + Optional label for the trial (often a numerical string). + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012816 + + + + + Indicator-variable + An aspect of the experiment or task that is measured as task conditions are varied during the experiment. Experiment indicators are sometimes called dependent variables. + + reserved + + + hedId + HED_0012817 + + + # + Name of the indicator variable. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012818 + + + + + Recording + A tag designating the data recording. Recording tags are usually have temporal scope which is the entire recording. + + reserved + + + hedId + HED_0012819 + + + # + Optional label for the recording. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012820 + + + + + Task + An assigned piece of work, usually with a time allotment. A tag used to indicate a linkage the structured activities performed as part of the experiment. + + reserved + + + hedId + HED_0012821 + + + # + Optional label for the task block. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012822 + + + + + Time-block + A tag used to indicate a contiguous time block in the experiment during which something is fixed or noted. + + reserved + + + hedId + HED_0012823 + + + # + Optional label for the task block. + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012824 + + + + + + Sensory-property + Relating to sensation or the physical senses. + + hedId + HED_0012825 + + + Sensory-attribute + A sensory characteristic associated with another entity. + + hedId + HED_0012826 + + + Auditory-attribute + Pertaining to the sense of hearing. + + hedId + HED_0012827 + + + Loudness + Perceived intensity of a sound. + + hedId + HED_0012828 + + + # + + takesValue + + + valueClass + numericClass + nameClass + + + hedId + HED_0012829 + + + + + Pitch + A perceptual property that allows the user to order sounds on a frequency scale. + + hedId + HED_0012830 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + frequencyUnits + + + hedId + HED_0012831 + + + + + Sound-envelope + Description of how a sound changes over time. + + hedId + HED_0012832 + + + Sound-envelope-attack + The time taken for initial run-up of level from nil to peak usually beginning when the key on a musical instrument is pressed. + + hedId + HED_0012833 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012834 + + + + + Sound-envelope-decay + The time taken for the subsequent run down from the attack level to the designated sustain level. + + hedId + HED_0012835 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012836 + + + + + Sound-envelope-release + The time taken for the level to decay from the sustain level to zero after the key is released. + + hedId + HED_0012837 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012838 + + + + + Sound-envelope-sustain + The time taken for the main sequence of the sound duration, until the key is released. + + hedId + HED_0012839 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + timeUnits + + + hedId + HED_0012840 + + + + + + Sound-volume + The sound pressure level (SPL) usually the ratio to a reference signal estimated as the lower bound of hearing. + + hedId + HED_0012841 + + + # + + takesValue + + + valueClass + numericClass + + + unitClass + intensityUnits + + + hedId + HED_0012842 + + + + + Timbre + The perceived sound quality of a singing voice or musical instrument. + + hedId + HED_0012843 + + + # + + takesValue + + + valueClass + nameClass + + + hedId + HED_0012844 + + + + + + Gustatory-attribute + Pertaining to the sense of taste. + + hedId + HED_0012845 + + + Bitter + Having a sharp, pungent taste. + + hedId + HED_0012846 + + + + Salty + Tasting of or like salt. + + hedId + HED_0012847 + + + + Savory + Belonging to a taste that is salty or spicy rather than sweet. + + hedId + HED_0012848 + + + + Sour + Having a sharp, acidic taste. + + hedId + HED_0012849 + + + + Sweet + Having or resembling the taste of sugar. + + hedId + HED_0012850 + + + + + Olfactory-attribute + Having a smell. + + hedId + HED_0012851 + + + + Somatic-attribute + Pertaining to the feelings in the body or of the nervous system. + + hedId + HED_0012852 + + + Pain + The sensation of discomfort, distress, or agony, resulting from the stimulation of specialized nerve endings. + + hedId + HED_0012853 + + + + Stress + The negative mental, emotional, and physical reactions that occur when environmental stressors are perceived as exceeding the adaptive capacities of the individual. + + hedId + HED_0012854 + + + + + Tactile-attribute + Pertaining to the sense of touch. + + hedId + HED_0012855 + + + Tactile-pressure + Having a feeling of heaviness. + + hedId + HED_0012856 + + + + Tactile-temperature + Having a feeling of hotness or coldness. + + hedId + HED_0012857 + + + + Tactile-texture + Having a feeling of roughness. + + hedId + HED_0012858 + + + + Tactile-vibration + Having a feeling of mechanical oscillation. + + hedId + HED_0012859 + + + + + Vestibular-attribute + Pertaining to the sense of balance or body position. + + hedId + HED_0012860 + + + + Visual-attribute + Pertaining to the sense of sight. + + hedId + HED_0012861 + + + Color + The appearance of objects (or light sources) described in terms of perception of their hue and lightness (or brightness) and saturation. + + hedId + HED_0012862 + + + CSS-color + One of 140 colors supported by all browsers. For more details such as the color RGB or HEX values,check:https://www.w3schools.com/colors/colors_groups.asp. + + hedId + HED_0012863 + + + Blue-color + CSS color group. + + hedId + HED_0012864 + + + Blue + CSS-color 0x0000FF. + + hedId + HED_0012865 + + + + CadetBlue + CSS-color 0x5F9EA0. + + hedId + HED_0012866 + + + + CornflowerBlue + CSS-color 0x6495ED. + + hedId + HED_0012867 + + + + DarkBlue + CSS-color 0x00008B. + + hedId + HED_0012868 + + + + DeepSkyBlue + CSS-color 0x00BFFF. + + hedId + HED_0012869 + + + + DodgerBlue + CSS-color 0x1E90FF. + + hedId + HED_0012870 + + + + LightBlue + CSS-color 0xADD8E6. + + hedId + HED_0012871 + + + + LightSkyBlue + CSS-color 0x87CEFA. + + hedId + HED_0012872 + + + + LightSteelBlue + CSS-color 0xB0C4DE. + + hedId + HED_0012873 + + + + MediumBlue + CSS-color 0x0000CD. + + hedId + HED_0012874 + + + + MidnightBlue + CSS-color 0x191970. + + hedId + HED_0012875 + + + + Navy + CSS-color 0x000080. + + hedId + HED_0012876 + + + + PowderBlue + CSS-color 0xB0E0E6. + + hedId + HED_0012877 + + + + RoyalBlue + CSS-color 0x4169E1. + + hedId + HED_0012878 + + + + SkyBlue + CSS-color 0x87CEEB. + + hedId + HED_0012879 + + + + SteelBlue + CSS-color 0x4682B4. + + hedId + HED_0012880 + + + + + Brown-color + CSS color group. + + hedId + HED_0012881 + + + Bisque + CSS-color 0xFFE4C4. + + hedId + HED_0012882 + + + + BlanchedAlmond + CSS-color 0xFFEBCD. + + hedId + HED_0012883 + + + + Brown + CSS-color 0xA52A2A. + + hedId + HED_0012884 + + + + BurlyWood + CSS-color 0xDEB887. + + hedId + HED_0012885 + + + + Chocolate + CSS-color 0xD2691E. + + hedId + HED_0012886 + + + + Cornsilk + CSS-color 0xFFF8DC. + + hedId + HED_0012887 + + + + DarkGoldenRod + CSS-color 0xB8860B. + + hedId + HED_0012888 + + + + GoldenRod + CSS-color 0xDAA520. + + hedId + HED_0012889 + + + + Maroon + CSS-color 0x800000. + + hedId + HED_0012890 + + + + NavajoWhite + CSS-color 0xFFDEAD. + + hedId + HED_0012891 + + + + Olive + CSS-color 0x808000. + + hedId + HED_0012892 + + + + Peru + CSS-color 0xCD853F. + + hedId + HED_0012893 + + + + RosyBrown + CSS-color 0xBC8F8F. + + hedId + HED_0012894 + + + + SaddleBrown + CSS-color 0x8B4513. + + hedId + HED_0012895 + + + + SandyBrown + CSS-color 0xF4A460. + + hedId + HED_0012896 + + + + Sienna + CSS-color 0xA0522D. + + hedId + HED_0012897 + + + + Tan + CSS-color 0xD2B48C. + + hedId + HED_0012898 + + + + Wheat + CSS-color 0xF5DEB3. + + hedId + HED_0012899 + + + + + Cyan-color + CSS color group. + + hedId + HED_0012900 + + + Aqua + CSS-color 0x00FFFF. + + hedId + HED_0012901 + + + + Aquamarine + CSS-color 0x7FFFD4. + + hedId + HED_0012902 + + + + Cyan + CSS-color 0x00FFFF. + + hedId + HED_0012903 + + + + DarkTurquoise + CSS-color 0x00CED1. + + hedId + HED_0012904 + + + + LightCyan + CSS-color 0xE0FFFF. + + hedId + HED_0012905 + + + + MediumTurquoise + CSS-color 0x48D1CC. + + hedId + HED_0012906 + + + + PaleTurquoise + CSS-color 0xAFEEEE. + + hedId + HED_0012907 + + + + Turquoise + CSS-color 0x40E0D0. + + hedId + HED_0012908 + + + + + Gray-color + CSS color group. + + hedId + HED_0012909 + + + Black + CSS-color 0x000000. + + hedId + HED_0012910 + + + + DarkGray + CSS-color 0xA9A9A9. + + hedId + HED_0012911 + + + + DarkSlateGray + CSS-color 0x2F4F4F. + + hedId + HED_0012912 + + + + DimGray + CSS-color 0x696969. + + hedId + HED_0012913 + + + + Gainsboro + CSS-color 0xDCDCDC. + + hedId + HED_0012914 + + + + Gray + CSS-color 0x808080. + + hedId + HED_0012915 + + + + LightGray + CSS-color 0xD3D3D3. + + hedId + HED_0012916 + + + + LightSlateGray + CSS-color 0x778899. + + hedId + HED_0012917 + + + + Silver + CSS-color 0xC0C0C0. + + hedId + HED_0012918 + + + + SlateGray + CSS-color 0x708090. + + hedId + HED_0012919 + + + + + Green-color + CSS color group. + + hedId + HED_0012920 + + + Chartreuse + CSS-color 0x7FFF00. + + hedId + HED_0012921 + + + + DarkCyan + CSS-color 0x008B8B. + + hedId + HED_0012922 + + + + DarkGreen + CSS-color 0x006400. + + hedId + HED_0012923 + + + + DarkOliveGreen + CSS-color 0x556B2F. + + hedId + HED_0012924 + + + + DarkSeaGreen + CSS-color 0x8FBC8F. + + hedId + HED_0012925 + + + + ForestGreen + CSS-color 0x228B22. + + hedId + HED_0012926 + + + + Green + CSS-color 0x008000. + + hedId + HED_0012927 + + + + GreenYellow + CSS-color 0xADFF2F. + + hedId + HED_0012928 + + + + LawnGreen + CSS-color 0x7CFC00. + + hedId + HED_0012929 + + + + LightGreen + CSS-color 0x90EE90. + + hedId + HED_0012930 + + + + LightSeaGreen + CSS-color 0x20B2AA. + + hedId + HED_0012931 + + + + Lime + CSS-color 0x00FF00. + + hedId + HED_0012932 + + + + LimeGreen + CSS-color 0x32CD32. + + hedId + HED_0012933 + + + + MediumAquaMarine + CSS-color 0x66CDAA. + + hedId + HED_0012934 + + + + MediumSeaGreen + CSS-color 0x3CB371. + + hedId + HED_0012935 + + + + MediumSpringGreen + CSS-color 0x00FA9A. + + hedId + HED_0012936 + + + + OliveDrab + CSS-color 0x6B8E23. + + hedId + HED_0012937 + + + + PaleGreen + CSS-color 0x98FB98. + + hedId + HED_0012938 + + + + SeaGreen + CSS-color 0x2E8B57. + + hedId + HED_0012939 + + + + SpringGreen + CSS-color 0x00FF7F. + + hedId + HED_0012940 + + + + Teal + CSS-color 0x008080. + + hedId + HED_0012941 + + + + YellowGreen + CSS-color 0x9ACD32. + + hedId + HED_0012942 + + + + + Orange-color + CSS color group. + + hedId + HED_0012943 + + + Coral + CSS-color 0xFF7F50. + + hedId + HED_0012944 + + + + DarkOrange + CSS-color 0xFF8C00. + + hedId + HED_0012945 + + + + Orange + CSS-color 0xFFA500. + + hedId + HED_0012946 + + + + OrangeRed + CSS-color 0xFF4500. + + hedId + HED_0012947 + + + + Tomato + CSS-color 0xFF6347. + + hedId + HED_0012948 + + + + + Pink-color + CSS color group. + + hedId + HED_0012949 + + + DeepPink + CSS-color 0xFF1493. + + hedId + HED_0012950 + + + + HotPink + CSS-color 0xFF69B4. + + hedId + HED_0012951 + + + + LightPink + CSS-color 0xFFB6C1. + + hedId + HED_0012952 + + + + MediumVioletRed + CSS-color 0xC71585. + + hedId + HED_0012953 + + + + PaleVioletRed + CSS-color 0xDB7093. + + hedId + HED_0012954 + + + + Pink + CSS-color 0xFFC0CB. + + hedId + HED_0012955 + + + + + Purple-color + CSS color group. + + hedId + HED_0012956 + + + BlueViolet + CSS-color 0x8A2BE2. + + hedId + HED_0012957 + + + + DarkMagenta + CSS-color 0x8B008B. + + hedId + HED_0012958 + + + + DarkOrchid + CSS-color 0x9932CC. + + hedId + HED_0012959 + + + + DarkSlateBlue + CSS-color 0x483D8B. + + hedId + HED_0012960 + + + + DarkViolet + CSS-color 0x9400D3. + + hedId + HED_0012961 + + + + Fuchsia + CSS-color 0xFF00FF. + + hedId + HED_0012962 + + + + Indigo + CSS-color 0x4B0082. + + hedId + HED_0012963 + + + + Lavender + CSS-color 0xE6E6FA. + + hedId + HED_0012964 + + + + Magenta + CSS-color 0xFF00FF. + + hedId + HED_0012965 + + + + MediumOrchid + CSS-color 0xBA55D3. + + hedId + HED_0012966 + + + + MediumPurple + CSS-color 0x9370DB. + + hedId + HED_0012967 + + + + MediumSlateBlue + CSS-color 0x7B68EE. + + hedId + HED_0012968 + + + + Orchid + CSS-color 0xDA70D6. + + hedId + HED_0012969 + + + + Plum + CSS-color 0xDDA0DD. + + hedId + HED_0012970 + + + + Purple + CSS-color 0x800080. + + hedId + HED_0012971 + + + + RebeccaPurple + CSS-color 0x663399. + + hedId + HED_0012972 + + + + SlateBlue + CSS-color 0x6A5ACD. + + hedId + HED_0012973 + + + + Thistle + CSS-color 0xD8BFD8. + + hedId + HED_0012974 + + + + Violet + CSS-color 0xEE82EE. + + hedId + HED_0012975 + + + + + Red-color + CSS color group. + + hedId + HED_0012976 + + + Crimson + CSS-color 0xDC143C. + + hedId + HED_0012977 + + + + DarkRed + CSS-color 0x8B0000. + + hedId + HED_0012978 + + + + DarkSalmon + CSS-color 0xE9967A. + + hedId + HED_0012979 + + + + FireBrick + CSS-color 0xB22222. + + hedId + HED_0012980 + + + + IndianRed + CSS-color 0xCD5C5C. + + hedId + HED_0012981 + + + + LightCoral + CSS-color 0xF08080. + + hedId + HED_0012982 + + + + LightSalmon + CSS-color 0xFFA07A. + + hedId + HED_0012983 + + + + Red + CSS-color 0xFF0000. + + hedId + HED_0012984 + + + + Salmon + CSS-color 0xFA8072. + + hedId + HED_0012985 + + + + + White-color + CSS color group. + + hedId + HED_0012986 + + + AliceBlue + CSS-color 0xF0F8FF. + + hedId + HED_0012987 + + + + AntiqueWhite + CSS-color 0xFAEBD7. + + hedId + HED_0012988 + + + + Azure + CSS-color 0xF0FFFF. + + hedId + HED_0012989 + + + + Beige + CSS-color 0xF5F5DC. + + hedId + HED_0012990 + + + + FloralWhite + CSS-color 0xFFFAF0. + + hedId + HED_0012991 + + + + GhostWhite + CSS-color 0xF8F8FF. + + hedId + HED_0012992 + + + + HoneyDew + CSS-color 0xF0FFF0. + + hedId + HED_0012993 + + + + Ivory + CSS-color 0xFFFFF0. + + hedId + HED_0012994 + + + + LavenderBlush + CSS-color 0xFFF0F5. + + hedId + HED_0012995 + + + + Linen + CSS-color 0xFAF0E6. + + hedId + HED_0012996 + + + + MintCream + CSS-color 0xF5FFFA. + + hedId + HED_0012997 + + + + MistyRose + CSS-color 0xFFE4E1. + + hedId + HED_0012998 + + + + OldLace + CSS-color 0xFDF5E6. + + hedId + HED_0012999 + + + + SeaShell + CSS-color 0xFFF5EE. + + hedId + HED_0013000 + + + + Snow + CSS-color 0xFFFAFA. + + hedId + HED_0013001 + + + + White + CSS-color 0xFFFFFF. + + hedId + HED_0013002 + + + + WhiteSmoke + CSS-color 0xF5F5F5. + + hedId + HED_0013003 + + + + + Yellow-color + CSS color group. + + hedId + HED_0013004 + + + DarkKhaki + CSS-color 0xBDB76B. + + hedId + HED_0013005 + + + + Gold + CSS-color 0xFFD700. + + hedId + HED_0013006 + + + + Khaki + CSS-color 0xF0E68C. + + hedId + HED_0013007 + + + + LemonChiffon + CSS-color 0xFFFACD. + + hedId + HED_0013008 + + + + LightGoldenRodYellow + CSS-color 0xFAFAD2. + + hedId + HED_0013009 + + + + LightYellow + CSS-color 0xFFFFE0. + + hedId + HED_0013010 + + + + Moccasin + CSS-color 0xFFE4B5. + + hedId + HED_0013011 + + + + PaleGoldenRod + CSS-color 0xEEE8AA. + + hedId + HED_0013012 + + + + PapayaWhip + CSS-color 0xFFEFD5. + + hedId + HED_0013013 + + + + PeachPuff + CSS-color 0xFFDAB9. + + hedId + HED_0013014 + + + + Yellow + CSS-color 0xFFFF00. + + hedId + HED_0013015 + + + + + + Color-shade + A slight degree of difference between colors, especially with regard to how light or dark it is or as distinguished from one nearly like it. + + hedId + HED_0013016 + + + Dark-shade + A color tone not reflecting much light. + + hedId + HED_0013017 + + + + Light-shade + A color tone reflecting more light. + + hedId + HED_0013018 + + + + + Grayscale + Using a color map composed of shades of gray, varying from black at the weakest intensity to white at the strongest. + + hedId + HED_0013019 + + + # + White intensity between 0 and 1. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013020 + + + + + HSV-color + A color representation that models how colors appear under light. + + hedId + HED_0013021 + + + HSV-value + An attribute of a visual sensation according to which an area appears to emit more or less light. + + hedId + HED_0013022 + + + # + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013023 + + + + + Hue + Attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors. + + hedId + HED_0013024 + + + # + Angular value between 0 and 360. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013025 + + + + + Saturation + Colorfulness of a stimulus relative to its own brightness. + + hedId + HED_0013026 + + + # + B value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013027 + + + + + + RGB-color + A color from the RGB schema. + + hedId + HED_0013028 + + + RGB-blue + The blue component. + + hedId + HED_0013029 + + + # + B value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013030 + + + + + RGB-green + The green component. + + hedId + HED_0013031 + + + # + G value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013032 + + + + + RGB-red + The red component. + + hedId + HED_0013033 + + + # + R value of RGB between 0 and 1. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013034 + + + + + + + Luminance + A quality that exists by virtue of the luminous intensity per unit area projected in a given direction. + + hedId + HED_0013035 + + + + Luminance-contrast + The difference in luminance in specific portions of a scene or image. + + suggestedTag + Percentage + Ratio + + + hedId + HED_0013036 + + + # + A non-negative value, usually in the range 0 to 1 or alternative 0 to 100, if representing a percentage. + + takesValue + + + valueClass + numericClass + + + hedId + HED_0013037 + + + + + Opacity + A measure of impenetrability to light. + + hedId + HED_0013038 + + + + + + Sensory-presentation + The entity has a sensory manifestation. + + hedId + HED_0013039 + + + Auditory-presentation + The sense of hearing is used in the presentation to the user. + + hedId + HED_0013040 + + + Loudspeaker-separation + The distance between two loudspeakers. Grouped with the Distance tag. + + suggestedTag + Distance + + + hedId + HED_0013041 + + + + Monophonic + Relating to sound transmission, recording, or reproduction involving a single transmission path. + + hedId + HED_0013042 + + + + Silent + The absence of ambient audible sound or the state of having ceased to produce sounds. + + hedId + HED_0013043 + + + + Stereophonic + Relating to, or constituting sound reproduction involving the use of separated microphones and two transmission channels to achieve the sound separation of a live hearing. + + hedId + HED_0013044 + + + + + Gustatory-presentation + The sense of taste used in the presentation to the user. + + hedId + HED_0013045 + + + + Olfactory-presentation + The sense of smell used in the presentation to the user. + + hedId + HED_0013046 + + + + Somatic-presentation + The nervous system is used in the presentation to the user. + + hedId + HED_0013047 + + + + Tactile-presentation + The sense of touch used in the presentation to the user. + + hedId + HED_0013048 + + + + Vestibular-presentation + The sense balance used in the presentation to the user. + + hedId + HED_0013049 + + + + Visual-presentation + The sense of sight used in the presentation to the user. + + hedId + HED_0013050 + + + 2D-view + A view showing only two dimensions. + + hedId + HED_0013051 + + + + 3D-view + A view showing three dimensions. + + hedId + HED_0013052 + + + + Background-view + Parts of the view that are farthest from the viewer and usually the not part of the visual focus. + + hedId + HED_0013053 + + + + Bistable-view + Something having two stable visual forms that have two distinguishable stable forms as in optical illusions. + + hedId + HED_0013054 + + + + Foreground-view + Parts of the view that are closest to the viewer and usually the most important part of the visual focus. + + hedId + HED_0013055 + + + + Foveal-view + Visual presentation directly on the fovea. A view projected on the small depression in the retina containing only cones and where vision is most acute. + + hedId + HED_0013056 + + + + Map-view + A diagrammatic representation of an area of land or sea showing physical features, cities, roads. + + hedId + HED_0013057 + + + Aerial-view + Elevated view of an object from above, with a perspective as though the observer were a bird. + + hedId + HED_0013058 + + + + Satellite-view + A representation as captured by technology such as a satellite. + + hedId + HED_0013059 + + + + Street-view + A 360-degrees panoramic view from a position on the ground. + + hedId + HED_0013060 + + + + + Peripheral-view + Indirect vision as it occurs outside the point of fixation. + + hedId + HED_0013061 + + + + + + + Task-property + Something that pertains to a task. + + extensionAllowed + + + hedId + HED_0013062 + + + Task-action-type + How an agent action should be interpreted in terms of the task specification. + + hedId + HED_0013063 + + + Appropriate-action + An action suitable or proper in the circumstances. + + relatedTag + Inappropriate-action + + + hedId + HED_0013064 + + + + Correct-action + An action that was a correct response in the context of the task. + + relatedTag + Incorrect-action + Indeterminate-action + + + hedId + HED_0013065 + + + + Correction + An action offering an improvement to replace a mistake or error. + + hedId + HED_0013066 + + + + Done-indication + An action that indicates that the participant has completed this step in the task. + + relatedTag + Ready-indication + + + hedId + HED_0013067 + + + + Imagined-action + Form a mental image or concept of something. This is used to identity something that only happened in the imagination of the participant as in imagined movements in motor imagery paradigms. + + hedId + HED_0013068 + + + + Inappropriate-action + An action not in keeping with what is correct or proper for the task. + + relatedTag + Appropriate-action + + + hedId + HED_0013069 + + + + Incorrect-action + An action considered wrong or incorrect in the context of the task. + + relatedTag + Correct-action + Indeterminate-action + + + hedId + HED_0013070 + + + + Indeterminate-action + An action that cannot be distinguished between two or more possibilities in the current context. This tag might be applied when an outside evaluator or a classification algorithm cannot determine a definitive result. + + relatedTag + Correct-action + Incorrect-action + Miss + Near-miss + + + hedId + HED_0013071 + + + + Miss + An action considered to be a failure in the context of the task. For example, if the agent is supposed to try to hit a target and misses. + + relatedTag + Near-miss + + + hedId + HED_0013072 + + + + Near-miss + An action barely satisfied the requirements of the task. In a driving experiment for example this could pertain to a narrowly avoided collision or other accident. + + relatedTag + Miss + + + hedId + HED_0013073 + + + + Omitted-action + An expected response was skipped. + + hedId + HED_0013074 + + + + Ready-indication + An action that indicates that the participant is ready to perform the next step in the task. + + relatedTag + Done-indication + + + hedId + HED_0013075 + + + + + Task-attentional-demand + Strategy for allocating attention toward goal-relevant information. + + hedId + HED_0013076 + + + Bottom-up-attention + Attentional guidance purely by externally driven factors to stimuli that are salient because of their inherent properties relative to the background. Sometimes this is referred to as stimulus driven. + + relatedTag + Top-down-attention + + + hedId + HED_0013077 + + + + Covert-attention + Paying attention without moving the eyes. + + relatedTag + Overt-attention + + + hedId + HED_0013078 + + + + Divided-attention + Integrating parallel multiple stimuli. Behavior involving responding simultaneously to multiple tasks or multiple task demands. + + relatedTag + Focused-attention + + + hedId + HED_0013079 + + + + Focused-attention + Responding discretely to specific visual, auditory, or tactile stimuli. + + relatedTag + Divided-attention + + + hedId + HED_0013080 + + + + Orienting-attention + Directing attention to a target stimulus. + + hedId + HED_0013081 + + + + Overt-attention + Selectively processing one location over others by moving the eyes to point at that location. + + relatedTag + Covert-attention + + + hedId + HED_0013082 + + + + Selective-attention + Maintaining a behavioral or cognitive set in the face of distracting or competing stimuli. Ability to pay attention to a limited array of all available sensory information. + + hedId + HED_0013083 + + + + Sustained-attention + Maintaining a consistent behavioral response during continuous and repetitive activity. + + hedId + HED_0013084 + + + + Switched-attention + Having to switch attention between two or more modalities of presentation. + + hedId + HED_0013085 + + + + Top-down-attention + Voluntary allocation of attention to certain features. Sometimes this is referred to goal-oriented attention. + + relatedTag + Bottom-up-attention + + + hedId + HED_0013086 + + + + + Task-effect-evidence + The evidence supporting the conclusion that the event had the specified effect. + + hedId + HED_0013087 + + + Behavioral-evidence + An indication or conclusion based on the behavior of an agent. + + hedId + HED_0013088 + + + + Computational-evidence + A type of evidence in which data are produced, and/or generated, and/or analyzed on a computer. + + hedId + HED_0013089 + + + + External-evidence + A phenomenon that follows and is caused by some previous phenomenon. + + hedId + HED_0013090 + + + + Intended-effect + A phenomenon that is intended to follow and be caused by some previous phenomenon. + + hedId + HED_0013091 + + + + + Task-event-role + The purpose of an event with respect to the task. + + hedId + HED_0013092 + + + Experimental-stimulus + Part of something designed to elicit a response in the experiment. + + hedId + HED_0013093 + + + + Incidental + A sensory or other type of event that is unrelated to the task or experiment. + + hedId + HED_0013094 + + + + Instructional + Usually associated with a sensory event intended to give instructions to the participant about the task or behavior. + + hedId + HED_0013095 + + + + Mishap + Unplanned disruption such as an equipment or experiment control abnormality or experimenter error. + + hedId + HED_0013096 + + + + Participant-response + Something related to a participant actions in performing the task. + + hedId + HED_0013097 + + + + Task-activity + Something that is part of the overall task or is necessary to the overall experiment but is not directly part of a stimulus-response cycle. Examples would be taking a survey or provided providing a silva sample. + + hedId + HED_0013098 + + + + Warning + Something that should warn the participant that the parameters of the task have been or are about to be exceeded such as a warning message about getting too close to the shoulder of the road in a driving task. + + hedId + HED_0013099 + + + + + Task-relationship + Specifying organizational importance of sub-tasks. + + hedId + HED_0013100 + + + Background-subtask + A part of the task which should be performed in the background as for example inhibiting blinks due to instruction while performing the primary task. + + hedId + HED_0013101 + + + + Primary-subtask + A part of the task which should be the primary focus of the participant. + + hedId + HED_0013102 + + + + + Task-stimulus-role + The role the stimulus plays in the task. + + hedId + HED_0013103 + + + Cue + A signal for an action, a pattern of stimuli indicating a particular response. + + hedId + HED_0013104 + + + + Distractor + A person or thing that distracts or a plausible but incorrect option in a multiple-choice question. In psychological studies this is sometimes referred to as a foil. + + hedId + HED_0013105 + + + + Expected + Considered likely, probable or anticipated. Something of low information value as in frequent non-targets in an RSVP paradigm. + + relatedTag + Unexpected + + + suggestedTag + Target + + + hedId + HED_0013106 + + + + Extraneous + Irrelevant or unrelated to the subject being dealt with. + + hedId + HED_0013107 + + + + Feedback + An evaluative response to an inquiry, process, event, or activity. + + hedId + HED_0013108 + + + + Go-signal + An indicator to proceed with a planned action. + + relatedTag + Stop-signal + + + hedId + HED_0013109 + + + + Meaningful + Conveying significant or relevant information. + + hedId + HED_0013110 + + + + Newly-learned + Representing recently acquired information or understanding. + + hedId + HED_0013111 + + + + Non-informative + Something that is not useful in forming an opinion or judging an outcome. + + hedId + HED_0013112 + + + + Non-target + Something other than that done or looked for. Also tag Expected if the Non-target is frequent. + + relatedTag + Target + + + hedId + HED_0013113 + + + + Not-meaningful + Not having a serious, important, or useful quality or purpose. + + hedId + HED_0013114 + + + + Novel + Having no previous example or precedent or parallel. + + hedId + HED_0013115 + + + + Oddball + Something unusual, or infrequent. + + relatedTag + Unexpected + + + suggestedTag + Target + + + hedId + HED_0013116 + + + + Penalty + A disadvantage, loss, or hardship due to some action. + + hedId + HED_0013117 + + + + Planned + Something that was decided on or arranged in advance. + + relatedTag + Unplanned + + + hedId + HED_0013118 + + + + Priming + An implicit memory effect in which exposure to a stimulus influences response to a later stimulus. + + hedId + HED_0013119 + + + + Query + A sentence of inquiry that asks for a reply. + + hedId + HED_0013120 + + + + Reward + A positive reinforcement for a desired action, behavior or response. + + hedId + HED_0013121 + + + + Stop-signal + An indicator that the agent should stop the current activity. + + relatedTag + Go-signal + + + hedId + HED_0013122 + + + + Target + Something fixed as a goal, destination, or point of examination. + + hedId + HED_0013123 + + + + Threat + An indicator that signifies hostility and predicts an increased probability of attack. + + hedId + HED_0013124 + + + + Timed + Something planned or scheduled to be done at a particular time or lasting for a specified amount of time. + + hedId + HED_0013125 + + + + Unexpected + Something that is not anticipated. + + relatedTag + Expected + + + hedId + HED_0013126 + + + + Unplanned + Something that has not been planned as part of the task. + + relatedTag + Planned + + + hedId + HED_0013127 + + + + + + + Relation + Concerns the way in which two or more people or things are connected. + + extensionAllowed + + + hedId + HED_0013128 + + + Comparative-relation + Something considered in comparison to something else. The first entity is the focus. + + hedId + HED_0013129 + + + Approximately-equal-to + (A, (Approximately-equal-to, B)) indicates that A and B have almost the same value. Here A and B could refer to sizes, orders, positions or other quantities. + + hedId + HED_0013130 + + + + Equal-to + (A, (Equal-to, B)) indicates that the size or order of A is the same as that of B. + + hedId + HED_0013131 + + + + Greater-than + (A, (Greater-than, B)) indicates that the relative size or order of A is bigger than that of B. + + hedId + HED_0013132 + + + + Greater-than-or-equal-to + (A, (Greater-than-or-equal-to, B)) indicates that the relative size or order of A is bigger than or the same as that of B. + + hedId + HED_0013133 + + + + Less-than + (A, (Less-than, B)) indicates that A is smaller than B. Here A and B could refer to sizes, orders, positions or other quantities. + + hedId + HED_0013134 + + + + Less-than-or-equal-to + (A, (Less-than-or-equal-to, B)) indicates that the relative size or order of A is smaller than or equal to B. + + hedId + HED_0013135 + + + + Not-equal-to + (A, (Not-equal-to, B)) indicates that the size or order of A is not the same as that of B. + + hedId + HED_0013136 + + + + + Connective-relation + Indicates two entities are related in some way. The first entity is the focus. + + hedId + HED_0013137 + + + Belongs-to + (A, (Belongs-to, B)) indicates that A is a member of B. + + hedId + HED_0013138 + + + + Connected-to + (A, (Connected-to, B)) indicates that A is related to B in some respect, usually through a direct link. + + hedId + HED_0013139 + + + + Contained-in + (A, (Contained-in, B)) indicates that A is completely inside of B. + + hedId + HED_0013140 + + + + Described-by + (A, (Described-by, B)) indicates that B provides information about A. + + hedId + HED_0013141 + + + + From-to + (A, (From-to, B)) indicates a directional relation from A to B. A is considered the source. + + hedId + HED_0013142 + + + + Group-of + (A, (Group-of, B)) indicates A is a group of items of type B. + + hedId + HED_0013143 + + + + Implied-by + (A, (Implied-by, B)) indicates B is suggested by A. + + hedId + HED_0013144 + + + + Includes + (A, (Includes, B)) indicates that A has B as a member or part. + + hedId + HED_0013145 + + + + Interacts-with + (A, (Interacts-with, B)) indicates A and B interact, possibly reciprocally. + + hedId + HED_0013146 + + + + Member-of + (A, (Member-of, B)) indicates A is a member of group B. + + hedId + HED_0013147 + + + + Part-of + (A, (Part-of, B)) indicates A is a part of the whole B. + + hedId + HED_0013148 + + + + Performed-by + (A, (Performed-by, B)) indicates that the action or procedure A was carried out by agent B. + + hedId + HED_0013149 + + + + Performed-using + (A, (Performed-using, B)) indicates that the action or procedure A was accomplished using B. + + hedId + HED_0013150 + + + + Related-to + (A, (Related-to, B)) indicates A has some relationship to B. + + hedId + HED_0013151 + + + + Unrelated-to + (A, (Unrelated-to, B)) indicates that A is not related to B.For example, A is not related to Task. + + hedId + HED_0013152 + + + + + Directional-relation + A relationship indicating direction of change of one entity relative to another. The first entity is the focus. + + hedId + HED_0013153 + + + Away-from + (A, (Away-from, B)) indicates that A is going or has moved away from B. The meaning depends on A and B. + + hedId + HED_0013154 + + + + Towards + (A, (Towards, B)) indicates that A is going to or has moved to B. The meaning depends on A and B. + + hedId + HED_0013155 + + + + + Logical-relation + Indicating a logical relationship between entities. The first entity is usually the focus. + + hedId + HED_0013156 + + + And + (A, (And, B)) means A and B are both in effect. + + hedId + HED_0013157 + + + + Or + (A, (Or, B)) means at least one of A and B are in effect. + + hedId + HED_0013158 + + + + + Spatial-relation + Indicating a relationship about position between entities. + + hedId + HED_0013159 + + + Above + (A, (Above, B)) means A is in a place or position that is higher than B. + + hedId + HED_0013160 + + + + Across-from + (A, (Across-from, B)) means A is on the opposite side of something from B. + + hedId + HED_0013161 + + + + Adjacent-to + (A, (Adjacent-to, B)) indicates that A is next to B in time or space. + + hedId + HED_0013162 + + + + Ahead-of + (A, (Ahead-of, B)) indicates that A is further forward in time or space in B. + + hedId + HED_0013163 + + + + Around + (A, (Around, B)) means A is in or near the present place or situation of B. + + hedId + HED_0013164 + + + + Behind + (A, (Behind, B)) means A is at or to the far side of B, typically so as to be hidden by it. + + hedId + HED_0013165 + + + + Below + (A, (Below, B)) means A is in a place or position that is lower than the position of B. + + hedId + HED_0013166 + + + + Between + (A, (Between, (B, C))) means A is in the space or interval separating B and C. + + hedId + HED_0013167 + + + + Bilateral-to + (A, (Bilateral, B)) means A is on both sides of B or affects both sides of B. + + hedId + HED_0013168 + + + + Bottom-edge-of + (A, (Bottom-edge-of, B)) means A is on the bottom most part or or near the boundary of B. + + relatedTag + Left-edge-of + Right-edge-of + Top-edge-of + + + hedId + HED_0013169 + + + + Boundary-of + (A, (Boundary-of, B)) means A is on or part of the edge or boundary of B. + + hedId + HED_0013170 + + + + Center-of + (A, (Center-of, B)) means A is at a point or or in an area that is approximately central within B. + + hedId + HED_0013171 + + + + Close-to + (A, (Close-to, B)) means A is at a small distance from or is located near in space to B. + + hedId + HED_0013172 + + + + Far-from + (A, (Far-from, B)) means A is at a large distance from or is not located near in space to B. + + hedId + HED_0013173 + + + + In-front-of + (A, (In-front-of, B)) means A is in a position just ahead or at the front part of B, potentially partially blocking B from view. + + hedId + HED_0013174 + + + + Left-edge-of + (A, (Left-edge-of, B)) means A is located on the left side of B on or near the boundary of B. + + relatedTag + Bottom-edge-of + Right-edge-of + Top-edge-of + + + hedId + HED_0013175 + + + + Left-side-of + (A, (Left-side-of, B)) means A is located on the left side of B usually as part of B. + + relatedTag + Right-side-of + + + hedId + HED_0013176 + + + + Lower-center-of + (A, (Lower-center-of, B)) means A is situated on the lower center part of B (due south). This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + hedId + HED_0013177 + + + + Lower-left-of + (A, (Lower-left-of, B)) means A is situated on the lower left part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-right-of + Upper-center-of + Upper-left-of + Upper-right-of + + + hedId + HED_0013178 + + + + Lower-right-of + (A, (Lower-right-of, B)) means A is situated on the lower right part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Upper-left-of + Upper-center-of + Upper-left-of + Lower-right-of + + + hedId + HED_0013179 + + + + Outside-of + (A, (Outside-of, B)) means A is located in the space around but not including B. + + hedId + HED_0013180 + + + + Over + (A, (Over, B)) means A above is above B so as to cover or protect or A extends over the a general area as from a from a vantage point. + + hedId + HED_0013181 + + + + Right-edge-of + (A, (Right-edge-of, B)) means A is located on the right side of B on or near the boundary of B. + + relatedTag + Bottom-edge-of + Left-edge-of + Top-edge-of + + + hedId + HED_0013182 + + + + Right-side-of + (A, (Right-side-of, B)) means A is located on the right side of B usually as part of B. + + relatedTag + Left-side-of + + + hedId + HED_0013183 + + + + To-left-of + (A, (To-left-of, B)) means A is located on or directed toward the side to the west of B when B is facing north. This term is used when A is not part of B. + + hedId + HED_0013184 + + + + To-right-of + (A, (To-right-of, B)) means A is located on or directed toward the side to the east of B when B is facing north. This term is used when A is not part of B. + + hedId + HED_0013185 + + + + Top-edge-of + (A, (Top-edge-of, B)) means A is on the uppermost part or or near the boundary of B. + + relatedTag + Left-edge-of + Right-edge-of + Bottom-edge-of + + + hedId + HED_0013186 + + + + Top-of + (A, (Top-of, B)) means A is on the uppermost part, side, or surface of B. + + hedId + HED_0013187 + + + + Underneath + (A, (Underneath, B)) means A is situated directly below and may be concealed by B. + + hedId + HED_0013188 + + + + Upper-center-of + (A, (Upper-center-of, B)) means A is situated on the upper center part of B (due north). This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + hedId + HED_0013189 + + + + Upper-left-of + (A, (Upper-left-of, B)) means A is situated on the upper left part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Lower-right-of + Upper-center-of + Upper-right-of + + + hedId + HED_0013190 + + + + Upper-right-of + (A, (Upper-right-of, B)) means A is situated on the upper right part of B. This relation is often used to specify qualitative information about screen position. + + relatedTag + Center-of + Lower-center-of + Lower-left-of + Upper-left-of + Upper-center-of + Lower-right-of + + + hedId + HED_0013191 + + + + Within + (A, (Within, B)) means A is on the inside of or contained in B. + + hedId + HED_0013192 + + + + + Temporal-relation + A relationship that includes a temporal or time-based component. + + hedId + HED_0013193 + + + After + (A, (After, B)) means A happens at a time subsequent to a reference time related to B. + + hedId + HED_0013194 + + + + Asynchronous-with + (A, (Asynchronous-with, B)) means A happens at times not occurring at the same time or having the same period or phase as B. + + hedId + HED_0013195 + + + + Before + (A, (Before, B)) means A happens at a time earlier in time or order than B. + + hedId + HED_0013196 + + + + During + (A, (During, B)) means A happens at some point in a given period of time in which B is ongoing. + + hedId + HED_0013197 + + + + Synchronous-with + (A, (Synchronous-with, B)) means A happens at occurs at the same time or rate as B. + + hedId + HED_0013198 + + + + Waiting-for + (A, (Waiting-for, B)) means A pauses for something to happen in B. + + hedId + HED_0013199 + + + + + + + + accelerationUnits + + defaultUnits + m-per-s^2 + + + hedId + HED_0011500 + + + m-per-s^2 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + allowedCharacter + caret + + + hedId + HED_0011600 + + + + + angleUnits + + defaultUnits + radian + + + hedId + HED_0011501 + + + radian + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011601 + + + + rad + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011602 + + + + degree + + conversionFactor + 0.0174533 + + + hedId + HED_0011603 + + + + + areaUnits + + defaultUnits + m^2 + + + hedId + HED_0011502 + + + m^2 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + allowedCharacter + caret + + + hedId + HED_0011604 + + + + + currencyUnits + Units indicating the worth of something. + + defaultUnits + $ + + + hedId + HED_0011503 + + + dollar + + conversionFactor + 1.0 + + + hedId + HED_0011605 + + + + $ + + unitPrefix + + + unitSymbol + + + conversionFactor + 1.0 + + + allowedCharacter + dollar + + + hedId + HED_0011606 + + + + euro + The official currency of a large subset of member countries of the European Union. + + hedId + HED_0011607 + + + + point + An arbitrary unit of value, usually an integer indicating reward or penalty. + + hedId + HED_0011608 + + + + + electricPotentialUnits + + defaultUnits + uV + + + hedId + HED_0011504 + + + V + + SIUnit + + + unitSymbol + + + conversionFactor + 0.000001 + + + hedId + HED_0011609 + + + + uV + Added as a direct unit because it is the default unit. + + conversionFactor + 1.0 + + + hedId + HED_0011644 + + + + volt + + SIUnit + + + conversionFactor + 0.000001 + + + hedId + HED_0011610 + + + + + frequencyUnits + + defaultUnits + Hz + + + hedId + HED_0011505 + + + hertz + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011611 + + + + Hz + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011612 + + + + + intensityUnits + + defaultUnits + dB + + + hedId + HED_0011506 + + + dB + Intensity expressed as ratio to a threshold. May be used for sound intensity. + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011613 + + + + candela + Units used to express light intensity. + + SIUnit + + + hedId + HED_0011614 + + + + cd + Units used to express light intensity. + + SIUnit + + + unitSymbol + + + hedId + HED_0011615 + + + + + jerkUnits + + defaultUnits + m-per-s^3 + + + hedId + HED_0011507 + + + m-per-s^3 + + unitSymbol + + + conversionFactor + 1.0 + + + allowedCharacter + caret + + + hedId + HED_0011616 + + + + + magneticFieldUnits + + defaultUnits + T + + + hedId + HED_0011508 + + + tesla + + SIUnit + + + conversionFactor + 10e-15 + + + hedId + HED_0011617 + + + + T + + SIUnit + + + unitSymbol + + + conversionFactor + 10e-15 + + + hedId + HED_0011618 + + + + + memorySizeUnits + + defaultUnits + B + + + hedId + HED_0011509 + + + byte + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011619 + + + + B + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011620 + + + + + physicalLengthUnits + + defaultUnits + m + + + hedId + HED_0011510 + + + foot + + conversionFactor + 0.3048 + + + hedId + HED_0011621 + + + + inch + + conversionFactor + 0.0254 + + + hedId + HED_0011622 + + + + meter + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011623 + + + + metre + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011624 + + + + m + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011625 + + + + mile + + conversionFactor + 1609.34 + + + hedId + HED_0011626 + + + + + speedUnits + + defaultUnits + m-per-s + + + hedId + HED_0011511 + + + m-per-s + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011627 + + + + mph + + unitSymbol + + + conversionFactor + 0.44704 + + + hedId + HED_0011628 + + + + kph + + unitSymbol + + + conversionFactor + 0.277778 + + + hedId + HED_0011629 + + + + + temperatureUnits + + defaultUnits + degree-Celsius + + + hedId + HED_0011512 + + + degree-Celsius + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011630 + + + + degree Celsius + Units are not allowed to have spaces. Use degree-Celsius or oC instead. + + deprecatedFrom + 8.2.0 + + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011631 + + + + oC + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011632 + + + + + timeUnits + + defaultUnits + s + + + hedId + HED_0011513 + + + second + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011633 + + + + s + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011634 + + + + day + + conversionFactor + 86400 + + + hedId + HED_0011635 + + + + month + + hedId + HED_0011645 + + + + minute + + conversionFactor + 60 + + + hedId + HED_0011636 + + + + hour + Should be in 24-hour format. + + conversionFactor + 3600 + + + hedId + HED_0011637 + + + + year + Years do not have a constant conversion factor to seconds. + + hedId + HED_0011638 + + + + + volumeUnits + + defaultUnits + m^3 + + + hedId + HED_0011514 + + + m^3 + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + allowedCharacter + caret + + + hedId + HED_0011639 + + + + + weightUnits + + defaultUnits + g + + + hedId + HED_0011515 + + + g + + SIUnit + + + unitSymbol + + + conversionFactor + 1.0 + + + hedId + HED_0011640 + + + + gram + + SIUnit + + + conversionFactor + 1.0 + + + hedId + HED_0011641 + + + + pound + + conversionFactor + 453.592 + + + hedId + HED_0011642 + + + + lb + + conversionFactor + 453.592 + + + hedId + HED_0011643 + + + + + + + deca + SI unit multiple representing 10e1. + + SIUnitModifier + + + conversionFactor + 10.0 + + + hedId + HED_0011400 + + + + da + SI unit multiple representing 10e1. + + SIUnitSymbolModifier + + + conversionFactor + 10.0 + + + hedId + HED_0011401 + + + + hecto + SI unit multiple representing 10e2. + + SIUnitModifier + + + conversionFactor + 100.0 + + + hedId + HED_0011402 + + + + h + SI unit multiple representing 10e2. + + SIUnitSymbolModifier + + + conversionFactor + 100.0 + + + hedId + HED_0011403 + + + + kilo + SI unit multiple representing 10e3. + + SIUnitModifier + + + conversionFactor + 1000.0 + + + hedId + HED_0011404 + + + + k + SI unit multiple representing 10e3. + + SIUnitSymbolModifier + + + conversionFactor + 1000.0 + + + hedId + HED_0011405 + + + + mega + SI unit multiple representing 10e6. + + SIUnitModifier + + + conversionFactor + 10e6 + + + hedId + HED_0011406 + + + + M + SI unit multiple representing 10e6. + + SIUnitSymbolModifier + + + conversionFactor + 10e6 + + + hedId + HED_0011407 + + + + giga + SI unit multiple representing 10e9. + + SIUnitModifier + + + conversionFactor + 10e9 + + + hedId + HED_0011408 + + + + G + SI unit multiple representing 10e9. + + SIUnitSymbolModifier + + + conversionFactor + 10e9 + + + hedId + HED_0011409 + + + + tera + SI unit multiple representing 10e12. + + SIUnitModifier + + + conversionFactor + 10e12 + + + hedId + HED_0011410 + + + + T + SI unit multiple representing 10e12. + + SIUnitSymbolModifier + + + conversionFactor + 10e12 + + + hedId + HED_0011411 + + + + peta + SI unit multiple representing 10e15. + + SIUnitModifier + + + conversionFactor + 10e15 + + + hedId + HED_0011412 + + + + P + SI unit multiple representing 10e15. + + SIUnitSymbolModifier + + + conversionFactor + 10e15 + + + hedId + HED_0011413 + + + + exa + SI unit multiple representing 10e18. + + SIUnitModifier + + + conversionFactor + 10e18 + + + hedId + HED_0011414 + + + + E + SI unit multiple representing 10e18. + + SIUnitSymbolModifier + + + conversionFactor + 10e18 + + + hedId + HED_0011415 + + + + zetta + SI unit multiple representing 10e21. + + SIUnitModifier + + + conversionFactor + 10e21 + + + hedId + HED_0011416 + + + + Z + SI unit multiple representing 10e21. + + SIUnitSymbolModifier + + + conversionFactor + 10e21 + + + hedId + HED_0011417 + + + + yotta + SI unit multiple representing 10e24. + + SIUnitModifier + + + conversionFactor + 10e24 + + + hedId + HED_0011418 + + + + Y + SI unit multiple representing 10e24. + + SIUnitSymbolModifier + + + conversionFactor + 10e24 + + + hedId + HED_0011419 + + + + deci + SI unit submultiple representing 10e-1. + + SIUnitModifier + + + conversionFactor + 0.1 + + + hedId + HED_0011420 + + + + d + SI unit submultiple representing 10e-1. + + SIUnitSymbolModifier + + + conversionFactor + 0.1 + + + hedId + HED_0011421 + + + + centi + SI unit submultiple representing 10e-2. + + SIUnitModifier + + + conversionFactor + 0.01 + + + hedId + HED_0011422 + + + + c + SI unit submultiple representing 10e-2. + + SIUnitSymbolModifier + + + conversionFactor + 0.01 + + + hedId + HED_0011423 + + + + milli + SI unit submultiple representing 10e-3. + + SIUnitModifier + + + conversionFactor + 0.001 + + + hedId + HED_0011424 + + + + m + SI unit submultiple representing 10e-3. + + SIUnitSymbolModifier + + + conversionFactor + 0.001 + + + hedId + HED_0011425 + + + + micro + SI unit submultiple representing 10e-6. + + SIUnitModifier + + + conversionFactor + 10e-6 + + + hedId + HED_0011426 + + + + u + SI unit submultiple representing 10e-6. + + SIUnitSymbolModifier + + + conversionFactor + 10e-6 + + + hedId + HED_0011427 + + + + nano + SI unit submultiple representing 10e-9. + + SIUnitModifier + + + conversionFactor + 10e-9 + + + hedId + HED_0011428 + + + + n + SI unit submultiple representing 10e-9. + + SIUnitSymbolModifier + + + conversionFactor + 10e-9 + + + hedId + HED_0011429 + + + + pico + SI unit submultiple representing 10e-12. + + SIUnitModifier + + + conversionFactor + 10e-12 + + + hedId + HED_0011430 + + + + p + SI unit submultiple representing 10e-12. + + SIUnitSymbolModifier + + + conversionFactor + 10e-12 + + + hedId + HED_0011431 + + + + femto + SI unit submultiple representing 10e-15. + + SIUnitModifier + + + conversionFactor + 10e-15 + + + hedId + HED_0011432 + + + + f + SI unit submultiple representing 10e-15. + + SIUnitSymbolModifier + + + conversionFactor + 10e-15 + + + hedId + HED_0011433 + + + + atto + SI unit submultiple representing 10e-18. + + SIUnitModifier + + + conversionFactor + 10e-18 + + + hedId + HED_0011434 + + + + a + SI unit submultiple representing 10e-18. + + SIUnitSymbolModifier + + + conversionFactor + 10e-18 + + + hedId + HED_0011435 + + + + zepto + SI unit submultiple representing 10e-21. + + SIUnitModifier + + + conversionFactor + 10e-21 + + + hedId + HED_0011436 + + + + z + SI unit submultiple representing 10e-21. + + SIUnitSymbolModifier + + + conversionFactor + 10e-21 + + + hedId + HED_0011437 + + + + yocto + SI unit submultiple representing 10e-24. + + SIUnitModifier + + + conversionFactor + 10e-24 + + + hedId + HED_0011438 + + + + y + SI unit submultiple representing 10e-24. + + SIUnitSymbolModifier + + + conversionFactor + 10e-24 + + + hedId + HED_0011439 + + + + + + dateTimeClass + Date-times should conform to ISO8601 date-time format YYYY-MM-DDThh:mm:ss.000000Z (year, month, day, hour (24h), minute, second, optional fractional seconds, and optional UTC time indicator. Any variation on the full form is allowed. + + allowedCharacter + digits + T + hyphen + colon + + + hedId + HED_0011301 + + + + nameClass + Value class designating values that have the characteristics of node names. The allowed characters are alphanumeric, hyphen, and underscore. + + allowedCharacter + letters + digits + underscore + hyphen + + + hedId + HED_0011302 + + + + numericClass + Value must be a valid numerical value. + + allowedCharacter + digits + E + e + plus + hyphen + period + + + hedId + HED_0011303 + + + + posixPath + Posix path specification. + + allowedCharacter + digits + letters + slash + colon + + + hedId + HED_0011304 + + + + textClass + Values that have the characteristics of text such as in descriptions. The text characters include printable characters (32 <= ASCII< 127) excluding comma, square bracket and curly braces as well as non ASCII (ASCII codes > 127). + + allowedCharacter + text + + + hedId + HED_0011305 + + + + + + hedId + The unique identifier of this element in the HED namespace. + + elementDomain + + + stringRange + + + hedId + HED_0010500 + + + annotationProperty + + + + requireChild + This tag must have a descendent. + + tagDomain + + + boolRange + + + hedId + HED_0010501 + + + annotationProperty + + + + rooted + This top-level library schema node should have a parent which is the indicated node in the partnered standard schema. + + tagDomain + + + tagRange + + + hedId + HED_0010502 + + + annotationProperty + + + + takesValue + This tag is a hashtag placeholder that is expected to be replaced with a user-defined value. + + tagDomain + + + boolRange + + + hedId + HED_0010503 + + + annotationProperty + + + + defaultUnits + The default units to use if the placeholder has a unit class but the substituted value has no units. + + unitClassDomain + + + unitRange + + + hedId + HED_0010104 + + + + isPartOf + This tag is part of the indicated tag -- as in the nose is part of the face. + + tagDomain + + + tagRange + + + hedId + HED_0010109 + + + + relatedTag + A HED tag that is closely related to this tag. This attribute is used by tagging tools. + + tagDomain + + + tagRange + + + hedId + HED_0010105 + + + + suggestedTag + A tag that is often associated with this tag. This attribute is used by tagging tools to provide tagging suggestions. + + tagDomain + + + tagRange + + + hedId + HED_0010106 + + + + unitClass + The unit class that the value of a placeholder node can belong to. + + tagDomain + + + unitClassRange + + + hedId + HED_0010107 + + + + valueClass + Type of value taken on by the value of a placeholder node. + + tagDomain + + + valueClassRange + + + hedId + HED_0010108 + + + + allowedCharacter + A special character that is allowed in expressing the value of a placeholder of a specified value class. Allowed characters may be listed individual, named individually, or named as a group as specified in Section 2.2 Character sets and restrictions of the HED specification. + + unitDomain + + + unitModifierDomain + + + valueClassDomain + + + stringRange + + + hedId + HED_0010304 + + + + conversionFactor + The factor to multiply these units or unit modifiers by to convert to default units. + + unitDomain + + + unitModifierDomain + + + numericRange + + + hedId + HED_0010305 + + + + deprecatedFrom + The latest schema version in which the element was not deprecated. + + elementDomain + + + stringRange + + + hedId + HED_0010306 + + + + extensionAllowed + Users can add unlimited levels of child nodes under this tag. This tag is propagated to child nodes except for hashtag placeholders. + + tagDomain + + + boolRange + + + hedId + HED_0010307 + + + + inLibrary + The named library schema that this schema element is from. This attribute is added by tools when a library schema is merged into its partnered standard schema. + + elementDomain + + + stringRange + + + hedId + HED_0010309 + + + + reserved + This tag has special meaning and requires special handling by tools. + + tagDomain + + + boolRange + + + hedId + HED_0010310 + + + + SIUnit + This unit element is an SI unit and can be modified by multiple and sub-multiple names. Note that some units such as byte are designated as SI units although they are not part of the standard. + + unitDomain + + + boolRange + + + hedId + HED_0010311 + + + + SIUnitModifier + This SI unit modifier represents a multiple or sub-multiple of a base unit rather than a unit symbol. + + unitModifierDomain + + + boolRange + + + hedId + HED_0010312 + + + + SIUnitSymbolModifier + This SI unit modifier represents a multiple or sub-multiple of a unit symbol rather than a base symbol. + + unitModifierDomain + + + boolRange + + + hedId + HED_0010313 + + + + tagGroup + This tag can only appear inside a tag group. + + tagDomain + + + boolRange + + + hedId + HED_0010314 + + + + topLevelTagGroup + This tag (or its descendants) can only appear in a top-level tag group. There are additional tag-specific restrictions on what other tags can appear in the group with this tag. + + tagDomain + + + boolRange + + + hedId + HED_0010315 + + + + unique + Only one of this tag or its descendants can be used in the event-level HED string. + + tagDomain + + + boolRange + + + hedId + HED_0010316 + + + + unitPrefix + This unit is a prefix unit (e.g., dollar sign in the currency units). + + unitDomain + + + boolRange + + + hedId + HED_0010317 + + + + unitSymbol + This tag is an abbreviation or symbol representing a type of unit. Unit symbols represent both the singular and the plural and thus cannot be pluralized. + + unitDomain + + + boolRange + + + hedId + HED_0010318 + + + + + + annotationProperty + The value is not inherited by child nodes. + + hedId + HED_0010701 + + + + boolRange + This schema attribute's value can be true or false. This property was formerly named boolProperty. + + hedId + HED_0010702 + + + + elementDomain + This schema attribute can apply to any type of element class (i.e., tag, unit, unit class, unit modifier, or value class). This property was formerly named elementProperty. + + hedId + HED_0010703 + + + + tagDomain + This schema attribute can apply to node (tag-term) elements. This was added so attributes could apply to multiple types of elements. This property was formerly named nodeProperty. + + hedId + HED_0010704 + + + + tagRange + This schema attribute's value can be a node. This property was formerly named nodeProperty. + + hedId + HED_0010705 + + + + numericRange + This schema attribute's value can be numeric. + + hedId + HED_0010706 + + + + stringRange + This schema attribute's value can be a string. + + hedId + HED_0010707 + + + + unitClassDomain + This schema attribute can apply to unit classes. This property was formerly named unitClassProperty. + + hedId + HED_0010708 + + + + unitClassRange + This schema attribute's value can be a unit class. + + hedId + HED_0010709 + + + + unitModifierDomain + This schema attribute can apply to unit modifiers. This property was formerly named unitModifierProperty. + + hedId + HED_0010710 + + + + unitDomain + This schema attribute can apply to units. This property was formerly named unitProperty. + + hedId + HED_0010711 + + + + unitRange + This schema attribute's value can be units. + + hedId + HED_0010712 + + + + valueClassDomain + This schema attribute can apply to value classes. This property was formerly named valueClassProperty. + + hedId + HED_0010713 + + + + valueClassRange + This schema attribute's value can be a value class. + + hedId + HED_0010714 + + + + The Standardized Computer-based Organized Reporting of EEG (SCORE) is a standard terminology for scalp EEG data assessment designed for use in clinical practice that may also be used for research purposes. +The SCORE standard defines terms for describing phenomena observed in scalp EEG data. It is also potentially applicable (with some suitable extensions) to EEG recorded in critical care and neonatal settings. +The SCORE standard received European consensus and has been endorsed by the European Chapter of the International Federation of Clinical Neurophysiology (IFCN) and the International League Against Epilepsy (ILAE) Commission on European Affairs. +A second revised and extended version of SCORE achieved international consensus. + +1 Beniczky ea 2013: "Standardized computer based organized reporting of EEG: SCORE." Epilepsia 54(6) pp.1112-1124. +2 Beniczky ea 2017: "Standardized computer based organized reporting of EEG: SCORE second version." Clinical Neurophysiology 128(11) pp.2334-2346. +3 Hirsch ea 2013: "American Clinical Neurophysiology Society's Standardized Critical Care EEG Terminology: 2012 version." Journal of clinical neurophysiology 30(1) pp.1-27. +4 Fisher ea 2017: "Instruction manual for the ILAE 2017 operational classification of seizure types." Epilepsia 58(4) pp.531-542. +5 Trenité ea 2001: "Visual sensitivity and epilepsy: a proposed terminology and classification for clinical and EEG phenomenology." Epilepsia 42(5) pp.692-701. +6 Blume ea 2001: "Glossary of descriptive terminology for ictal semiology: report of the ILAE task force on classification and terminology." Epilepsia 42(9) pp.1212-1218. + +TPA KR DH SM July 2024 + diff --git a/hed/schema/schema_validation_util.py b/hed/schema/schema_validation_util.py index 2d9802bd..e241fd50 100644 --- a/hed/schema/schema_validation_util.py +++ b/hed/schema/schema_validation_util.py @@ -1,164 +1,164 @@ -"""Utilities used in HED validation/loading using a HED schema.""" - -from hed.errors.error_reporter import ErrorHandler -from hed.errors.error_types import SchemaWarnings -from hed.schema import hed_schema_constants as constants -from hed.schema.hed_schema_constants import character_types -from hed.schema.hed_schema import HedSchema - - -def validate_schema_tag_new(hed_entry): - """ Check tag entry for capitalization and illegal characters. - - Parameters: - hed_entry (HedTagEntry): A single tag entry - - Returns: - list: A list of all formatting issues found in the term. Each issue is a dictionary. - """ - issues_list = [] - hed_term = hed_entry.short_tag_name - # Any # terms will have already been validated as the previous entry. - if hed_term == "#": - return issues_list - - if hed_term and hed_term[0] and not (hed_term[0].isdigit() or hed_term[0].isupper()): - issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CAPITALIZATION, - hed_term, char_index=0, problem_char=hed_term[0]) - issues_list += validate_schema_term_new(hed_entry, hed_term) - return issues_list - - -def validate_schema_term_new(hed_entry, hed_term=None): - """ Check the term for invalid character issues - - Parameters: - hed_entry (HedSchemaEntry): A single schema entry - hed_term (str or None): Use instead of hed_entry.name if present. - - Returns: - list: A list of all formatting issues found in the term. Each issue is a dictionary. - """ - if not hed_term: - hed_term = hed_entry.name - issues_list = [] - # todo: potentially optimize this someday, as most values are the same - character_set = get_allowed_characters_by_name(["name"] + - hed_entry.attributes.get("allowedCharacter", "").split(",")) - indexes = get_problem_indexes(hed_term, character_set) - for char, index in indexes: - issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CHARACTERS_IN_TAG, - hed_term, char_index=index, problem_char=char) - return issues_list - - -def validate_schema_description_new(hed_entry): - """ Check the description of the entry for invalid character issues - - Parameters: - hed_entry (HedSchemaEntry): A single schema entry - - Returns: - list: A list of all invalid characters found in description. Each issue is a dictionary. - """ - if not hed_entry.description: - return [] - issues_list = [] - character_set = get_allowed_characters_by_name(["text", "comma"]) - indexes = get_problem_indexes(hed_entry.description, character_set) - # Kludge, just get short name here if we have it for error reporting - name = hed_entry.name - if hasattr(hed_entry, "short_tag_name"): - name = hed_entry.short_tag_name - for char, index in indexes: - - issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CHARACTERS_IN_DESC, - hed_entry.description, name, problem_char=char, char_index=index) - return issues_list - - -def schema_version_for_library(hed_schema, library_name): - """ Given the library name and hed schema object, return the version - - Parameters: - hed_schema (HedSchema): the schema object - library_name (str or None): The library name you're interested in. "" for the standard schema. - - Returns: - version_number (str): The version number of the given library name. Returns None if unknown library_name. - """ - if library_name is None: - library_name = "" - names = hed_schema.library.split(",") - versions = hed_schema.version_number.split(",") - for name, version in zip(names, versions): - if name == library_name: - return version - - # Return the partnered schema version - if library_name == "" and hed_schema.with_standard: - return hed_schema.with_standard - return None - - -def get_allowed_characters(value_classes): - """Returns the allowed characters in a given container of value classes - - Parameters: - value_classes(list of HedSchemaEntry): A list of schema entries that should have the allowedCharacter attribute - - Returns: - character_set(set): The set of all characters from the given classes - """ - # This could be pre-computed - character_set_names = [] - - for value_class in value_classes: - allowed_types = value_class.attributes.get(constants.HedKey.AllowedCharacter, "").split(",") - character_set_names.extend(allowed_types) - - character_set = get_allowed_characters_by_name(character_set_names) - # for now, just always allow these special cases(it's validated extensively elsewhere) - character_set.update("#/") - return character_set - - -def get_allowed_characters_by_name(character_set_names): - """Returns the allowed characters from a list of character set names - - Note: "nonascii" is a special case "character" that can be included as well - - Parameters: - character_set_names(list of str): A list of character sets to allow. See hed_schema_constants.character_types - - Returns: - character_set(set): The set of all characters from the names - """ - character_set = set() - for name in character_set_names: - if name in character_types and name != "nonascii": - character_set.update(character_types[name]) - else: - character_set.add(name) - return character_set - - -def get_problem_indexes(validation_string, character_set, index_adj=0): - """Finds indexes with values not in character set - - Parameters: - validation_string(str): The string to check characters in - character_set(set): the list of valid characters(or the value "nonascii" as a set entry) - index_adj(int): the value to adjust the reported indices by, if this isn't the start of a string. - - Returns: - index_list(tuple of (str, int)): The list of problematic characters and indices - """ - if not character_set: - return [] - - indexes = [(char, index + index_adj) for index, char in enumerate(validation_string) if char not in character_set] - if "nonascii" in character_set: - indexes = [(char, index) for char, index in indexes if not ord(char) > 127] - - return indexes +"""Utilities used in HED validation/loading using a HED schema.""" + +from hed.errors.error_reporter import ErrorHandler +from hed.errors.error_types import SchemaWarnings +from hed.schema import hed_schema_constants as constants +from hed.schema.hed_schema_constants import character_types +from hed.schema.hed_schema import HedSchema + + +def validate_schema_tag_new(hed_entry): + """ Check tag entry for capitalization and illegal characters. + + Parameters: + hed_entry (HedTagEntry): A single tag entry + + Returns: + list: A list of all formatting issues found in the term. Each issue is a dictionary. + """ + issues_list = [] + hed_term = hed_entry.short_tag_name + # Any # terms will have already been validated as the previous entry. + if hed_term == "#": + return issues_list + + if hed_term and hed_term[0] and not (hed_term[0].isdigit() or hed_term[0].isupper()): + issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CAPITALIZATION, + hed_term, char_index=0, problem_char=hed_term[0]) + issues_list += validate_schema_term_new(hed_entry, hed_term) + return issues_list + + +def validate_schema_term_new(hed_entry, hed_term=None): + """ Check the term for invalid character issues + + Parameters: + hed_entry (HedSchemaEntry): A single schema entry + hed_term (str or None): Use instead of hed_entry.name if present. + + Returns: + list: A list of all formatting issues found in the term. Each issue is a dictionary. + """ + if not hed_term: + hed_term = hed_entry.name + issues_list = [] + # todo: potentially optimize this someday, as most values are the same + character_set = get_allowed_characters_by_name(["name"] + + hed_entry.attributes.get("allowedCharacter", "").split(",")) + indexes = get_problem_indexes(hed_term, character_set) + for char, index in indexes: + issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CHARACTERS_IN_TAG, + hed_term, char_index=index, problem_char=char) + return issues_list + + +def validate_schema_description_new(hed_entry): + """ Check the description of the entry for invalid character issues + + Parameters: + hed_entry (HedSchemaEntry): A single schema entry + + Returns: + list: A list of all invalid characters found in description. Each issue is a dictionary. + """ + if not hed_entry.description: + return [] + issues_list = [] + character_set = get_allowed_characters_by_name(["text", "comma"]) + indexes = get_problem_indexes(hed_entry.description, character_set) + # Kludge, just get short name here if we have it for error reporting + name = hed_entry.name + if hasattr(hed_entry, "short_tag_name"): + name = hed_entry.short_tag_name + for char, index in indexes: + + issues_list += ErrorHandler.format_error(SchemaWarnings.SCHEMA_INVALID_CHARACTERS_IN_DESC, + hed_entry.description, name, problem_char=char, char_index=index) + return issues_list + + +def schema_version_for_library(hed_schema, library_name): + """ Given the library name and hed schema object, return the version + + Parameters: + hed_schema (HedSchema): the schema object + library_name (str or None): The library name you're interested in. "" for the standard schema. + + Returns: + version_number (str): The version number of the given library name. Returns None if unknown library_name. + """ + if library_name is None: + library_name = "" + names = hed_schema.library.split(",") + versions = hed_schema.version_number.split(",") + for name, version in zip(names, versions): + if name == library_name: + return version + + # Return the partnered schema version + if library_name == "" and hed_schema.with_standard: + return hed_schema.with_standard + return None + + +def get_allowed_characters(value_classes): + """Returns the allowed characters in a given container of value classes + + Parameters: + value_classes(list of HedSchemaEntry): A list of schema entries that should have the allowedCharacter attribute + + Returns: + character_set(set): The set of all characters from the given classes + """ + # This could be pre-computed + character_set_names = [] + + for value_class in value_classes: + allowed_types = value_class.attributes.get(constants.HedKey.AllowedCharacter, "").split(",") + character_set_names.extend(allowed_types) + + character_set = get_allowed_characters_by_name(character_set_names) + # for now, just always allow these special cases(it's validated extensively elsewhere) + character_set.update("#/") + return character_set + + +def get_allowed_characters_by_name(character_set_names): + """Returns the allowed characters from a list of character set names + + Note: "nonascii" is a special case "character" that can be included as well + + Parameters: + character_set_names(list of str): A list of character sets to allow. See hed_schema_constants.character_types + + Returns: + character_set(set): The set of all characters from the names + """ + character_set = set() + for name in character_set_names: + if name in character_types and name != "nonascii": + character_set.update(character_types[name]) + else: + character_set.add(name) + return character_set + + +def get_problem_indexes(validation_string, character_set, index_adj=0): + """Finds indexes with values not in character set + + Parameters: + validation_string(str): The string to check characters in + character_set(set): the list of valid characters(or the value "nonascii" as a set entry) + index_adj(int): the value to adjust the reported indices by, if this isn't the start of a string. + + Returns: + index_list(tuple of (str, int)): The list of problematic characters and indices + """ + if not character_set: + return [] + + indexes = [(char, index + index_adj) for index, char in enumerate(validation_string) if char not in character_set] + if "nonascii" in character_set: + indexes = [(char, index) for char, index in indexes if not ord(char) > 127] + + return indexes diff --git a/hed/validator/def_validator.py b/hed/validator/def_validator.py index 7768abda..088a03c0 100644 --- a/hed/validator/def_validator.py +++ b/hed/validator/def_validator.py @@ -1,207 +1,208 @@ -""" Validates of Def, Def-expand and Temporal groups. """ -from hed.models.hed_group import HedGroup -from hed.models.hed_tag import HedTag -from hed.models.definition_dict import DefinitionDict -from hed.errors.error_types import ValidationErrors -from hed.errors.error_reporter import ErrorHandler -from hed.models.model_constants import DefTagNames -from hed.errors.error_types import TemporalErrors - - -class DefValidator(DefinitionDict): - """ Validates Def/ and Def-expand/, as well as Temporal groups: Onset, Inset, and Offset - - """ - - def __init__(self, def_dicts=None, hed_schema=None): - """ Initialize for definitions in hed strings. - - Parameters: - def_dicts (list or DefinitionDict or str): DefinitionDicts containing the definitions to pass to baseclass - hed_schema(HedSchema or None): Required if passing strings or lists of strings, unused otherwise. - """ - super().__init__(def_dicts, hed_schema=hed_schema) - - def validate_def_tags(self, hed_string_obj, hed_validator=None): - """ Validate Def/Def-Expand tags. - - Parameters: - hed_string_obj (HedString): The hed string to process. - hed_validator (HedValidator): Used to validate the placeholder replacement. - Returns: - list: Issues found related to validating defs. Each issue is a dictionary. - """ - # This is needed primarily to validate the contents of a def-expand matches the default. - def_issues = [] - # We need to check for labels to expand in ALL groups - for def_tag, def_expand_group, def_group in hed_string_obj.find_def_tags(recursive=True): - def_issues += self._validate_def_contents(def_tag, def_expand_group, hed_validator) - - return def_issues - - @staticmethod - def _report_missing_or_invalid_value(def_tag, def_entry, is_def_expand_tag): - """Returns the correct error for this type of def tag - - Parameters: - def_tag(HedTag): The source tag - def_entry(DefinitionEntry): The entry for this definition - is_def_expand_tag(bool): If the given def_tag is a def-expand tag or not. - - Returns: - issues(list): Issues found from validating placeholders. - """ - def_issues = [] - if def_entry.takes_value: - error_code = ValidationErrors.HED_DEF_VALUE_MISSING - if is_def_expand_tag: - error_code = ValidationErrors.HED_DEF_EXPAND_VALUE_MISSING - else: - error_code = ValidationErrors.HED_DEF_VALUE_EXTRA - if is_def_expand_tag: - error_code = ValidationErrors.HED_DEF_EXPAND_VALUE_EXTRA - def_issues += ErrorHandler.format_error(error_code, tag=def_tag) - return def_issues - - def _validate_def_contents(self, def_tag, def_expand_group, hed_validator): - """ Check for issues with expanding a tag from Def to a Def-expand tag group - - Parameters: - def_tag (HedTag): Source hed tag that may be a Def or Def-expand tag. - def_expand_group (HedGroup or HedTag): Source group for this def-expand tag. - Same as def_tag if this is not a def-expand tag. - hed_validator (HedValidator): Used to validate the placeholder replacement. - - Returns: - issues(list): Issues found from validating placeholders. - """ - def_issues = [] - is_def_expand_tag = def_expand_group != def_tag - tag_label, _, placeholder = def_tag.extension.partition('/') - - label_tag_lower = tag_label.casefold() - def_entry = self.defs.get(label_tag_lower) - if def_entry is None: - error_code = ValidationErrors.HED_DEF_UNMATCHED - if is_def_expand_tag: - error_code = ValidationErrors.HED_DEF_EXPAND_UNMATCHED - def_issues += ErrorHandler.format_error(error_code, tag=def_tag) - else: - def_contents = def_entry.get_definition(def_tag, placeholder_value=placeholder, - return_copy_of_tag=True) - if def_contents is not None: - if is_def_expand_tag and def_expand_group != def_contents: - def_issues += ErrorHandler.format_error(ValidationErrors.HED_DEF_EXPAND_INVALID, - tag=def_tag, actual_def=def_contents, - found_def=def_expand_group) - else: - def_issues += self._report_missing_or_invalid_value(def_tag, def_entry, is_def_expand_tag) - - return def_issues - - def validate_def_value_units(self, def_tag, hed_validator): - """Equivalent to HedValidator.validate_units for the special case of a Def or Def-expand tag""" - tag_label, _, placeholder = def_tag.extension.partition('/') - is_def_expand_tag = def_tag.short_base_tag == DefTagNames.DEF_EXPAND_KEY - - def_entry = self.defs.get(tag_label.casefold()) - # These errors will be caught as can't match definition - if def_entry is None: - return [] - - error_code = ValidationErrors.DEF_INVALID - if is_def_expand_tag: - error_code = ValidationErrors.DEF_EXPAND_INVALID - - def_issues = [] - - # Validate the def name vs the name class - def_issues += hed_validator.validate_units(def_tag, - tag_label, - error_code=error_code) - - def_contents = def_entry.get_definition(def_tag, placeholder_value=placeholder, return_copy_of_tag=True) - if def_contents and def_entry.takes_value and hed_validator: - placeholder_tag = def_contents.get_first_group().find_placeholder_tag() - # Handle the case where they're adding a unit as part of a placeholder. eg Speed/# mph - if placeholder_tag: - placeholder = placeholder_tag.extension - def_issues += hed_validator.validate_units(placeholder_tag, - placeholder, - report_as=def_tag, - error_code=error_code, - index_offset=len(tag_label) + 1) - - return def_issues - - def validate_onset_offset(self, hed_string_obj): - """ Validate onset/offset - - Parameters: - hed_string_obj (HedString): The hed string to check. - - Returns: - list: A list of issues found in validating onsets (i.e., out of order onsets, unknown def names). - """ - onset_issues = [] - for found_onset, found_group in self._find_onset_tags(hed_string_obj): - if not found_onset: - return [] - - def_tags = found_group.find_def_tags() - if not def_tags: - onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_NO_DEF_TAG_FOUND, found_onset) - continue - - if len(def_tags) > 1: - onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_TOO_MANY_DEFS, - tag=def_tags[0][0], - tag_list=[tag[0] for tag in def_tags[1:]]) - continue - - # Get all children but def group and onset/offset, then validate #/type of children. - def_tag, def_group, _ = def_tags[0] - if def_group is None: - def_group = def_tag - children = [child for child in found_group.children if - def_group is not child and found_onset is not child] - - # Delay tag is checked for uniqueness elsewhere, so we can safely remove all of them - children = [child for child in children - if not isinstance(child, HedTag) or child.short_base_tag != DefTagNames.DELAY_KEY] - max_children = 1 - if found_onset.short_base_tag == DefTagNames.OFFSET_KEY: - max_children = 0 - if len(children) > max_children: - onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_WRONG_NUMBER_GROUPS, - def_tag, - found_group.children) - continue - - if children: - # Make this a loop if max_children can be > 1 - child = children[0] - if not isinstance(child, HedGroup): - onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_TAG_OUTSIDE_OF_GROUP, - child, - def_tag) - - # At this point we have either an onset or offset tag and it's name - onset_issues += self._handle_onset_or_offset(def_tag) - - return onset_issues - - def _find_onset_tags(self, hed_string_obj): - return hed_string_obj.find_top_level_tags(anchor_tags=DefTagNames.TEMPORAL_KEYS) - - def _handle_onset_or_offset(self, def_tag): - def_name, _, placeholder = def_tag.extension.partition('/') - - def_entry = self.defs.get(def_name.casefold()) - if def_entry is None: - return ErrorHandler.format_error(TemporalErrors.ONSET_DEF_UNMATCHED, tag=def_tag) - if bool(def_entry.takes_value) != bool(placeholder): - return ErrorHandler.format_error(TemporalErrors.ONSET_PLACEHOLDER_WRONG, tag=def_tag, - has_placeholder=bool(def_entry.takes_value)) - - return [] +""" Validates of Def, Def-expand and Temporal groups. """ +from hed.models.hed_group import HedGroup +from hed.models.hed_tag import HedTag +from hed.models.definition_dict import DefinitionDict +from hed.errors.error_types import ValidationErrors +from hed.errors.error_reporter import ErrorHandler +from hed.models.model_constants import DefTagNames +from hed.errors.error_types import TemporalErrors + + +class DefValidator(DefinitionDict): + """ Validates Def/ and Def-expand/, as well as Temporal groups: Onset, Inset, and Offset + + """ + + def __init__(self, def_dicts=None, hed_schema=None): + """ Initialize for definitions in hed strings. + + Parameters: + def_dicts (list or DefinitionDict or str): DefinitionDicts containing the definitions to pass to baseclass + hed_schema(HedSchema or None): Required if passing strings or lists of strings, unused otherwise. + """ + super().__init__(def_dicts, hed_schema=hed_schema) + + def validate_def_tags(self, hed_string_obj, hed_validator=None): + """ Validate Def/Def-Expand tags. + + Parameters: + hed_string_obj (HedString): The hed string to process. + hed_validator (HedValidator): Used to validate the placeholder replacement. + Returns: + list: Issues found related to validating defs. Each issue is a dictionary. + """ + # This is needed primarily to validate the contents of a def-expand matches the default. + def_issues = [] + # We need to check for labels to expand in ALL groups + for def_tag, def_expand_group, def_group in hed_string_obj.find_def_tags(recursive=True): + def_issues += self._validate_def_contents(def_tag, def_expand_group, hed_validator) + + return def_issues + + @staticmethod + def _report_missing_or_invalid_value(def_tag, def_entry, is_def_expand_tag): + """Returns the correct error for this type of def tag + + Parameters: + def_tag(HedTag): The source tag + def_entry(DefinitionEntry): The entry for this definition + is_def_expand_tag(bool): If the given def_tag is a def-expand tag or not. + + Returns: + issues(list): Issues found from validating placeholders. + """ + def_issues = [] + if def_entry.takes_value: + error_code = ValidationErrors.HED_DEF_VALUE_MISSING + if is_def_expand_tag: + error_code = ValidationErrors.HED_DEF_EXPAND_VALUE_MISSING + else: + error_code = ValidationErrors.HED_DEF_VALUE_EXTRA + if is_def_expand_tag: + error_code = ValidationErrors.HED_DEF_EXPAND_VALUE_EXTRA + def_issues += ErrorHandler.format_error(error_code, tag=def_tag) + return def_issues + + def _validate_def_contents(self, def_tag, def_expand_group, hed_validator): + """ Check for issues with expanding a tag from Def to a Def-expand tag group + + Parameters: + def_tag (HedTag): Source hed tag that may be a Def or Def-expand tag. + def_expand_group (HedGroup or HedTag): Source group for this def-expand tag. + Same as def_tag if this is not a def-expand tag. + hed_validator (HedValidator): Used to validate the placeholder replacement. + + Returns: + issues(list): Issues found from validating placeholders. + """ + def_issues = [] + is_def_expand_tag = def_expand_group != def_tag + tag_label, _, placeholder = def_tag.extension.partition('/') + + label_tag_lower = tag_label.casefold() + def_entry = self.defs.get(label_tag_lower) + if def_entry is None: + error_code = ValidationErrors.HED_DEF_UNMATCHED + if is_def_expand_tag: + error_code = ValidationErrors.HED_DEF_EXPAND_UNMATCHED + def_issues += ErrorHandler.format_error(error_code, tag=def_tag) + else: + def_contents = def_entry.get_definition(def_tag, placeholder_value=placeholder, + return_copy_of_tag=True) + if def_contents is not None: + if is_def_expand_tag and def_expand_group != def_contents: + def_issues += ErrorHandler.format_error(ValidationErrors.HED_DEF_EXPAND_INVALID, + tag=def_tag, actual_def=def_contents, + found_def=def_expand_group) + else: + def_issues += self._report_missing_or_invalid_value(def_tag, def_entry, is_def_expand_tag) + + return def_issues + + def validate_def_value_units(self, def_tag, hed_validator, allow_placeholders=False): + """Equivalent to HedValidator.validate_units for the special case of a Def or Def-expand tag""" + tag_label, _, placeholder = def_tag.extension.partition('/') + is_def_expand_tag = def_tag.short_base_tag == DefTagNames.DEF_EXPAND_KEY + + def_entry = self.defs.get(tag_label.casefold()) + # These errors will be caught as can't match definition + if def_entry is None: + return [] + + error_code = ValidationErrors.DEF_INVALID + if is_def_expand_tag: + error_code = ValidationErrors.DEF_EXPAND_INVALID + + # Validate the def name vs the name class + def_issues = hed_validator._unit_validator._check_value_class(def_tag, tag_label, report_as=None, error_code=error_code, index_offset=0) + # def_issues += hed_validator.validate_units(def_tag, + # tag_label, + # error_code=error_code) + + def_contents = def_entry.get_definition(def_tag, placeholder_value=placeholder, return_copy_of_tag=True) + if def_contents and def_entry.takes_value and hed_validator: + placeholder_tag = def_contents.get_first_group().find_placeholder_tag() + # Handle the case where they're adding a unit as part of a placeholder. eg Speed/# mph + if placeholder_tag: + placeholder = placeholder_tag.extension + if placeholder.startswith('# '): + placeholder = placeholder[2:] + def_issues += hed_validator.validate_units(placeholder_tag, + placeholder, + report_as=def_tag, + error_code=error_code, + index_offset=len(tag_label) + 1) + + return def_issues + + def validate_onset_offset(self, hed_string_obj): + """ Validate onset/offset + + Parameters: + hed_string_obj (HedString): The hed string to check. + + Returns: + list: A list of issues found in validating onsets (i.e., out of order onsets, unknown def names). + """ + onset_issues = [] + for found_onset, found_group in self._find_onset_tags(hed_string_obj): + if not found_onset: + return [] + + def_tags = found_group.find_def_tags() + if not def_tags: + onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_NO_DEF_TAG_FOUND, found_onset) + continue + + if len(def_tags) > 1: + onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_TOO_MANY_DEFS, + tag=def_tags[0][0], + tag_list=[tag[0] for tag in def_tags[1:]]) + continue + + # Get all children but def group and onset/offset, then validate #/type of children. + def_tag, def_group, _ = def_tags[0] + if def_group is None: + def_group = def_tag + children = [child for child in found_group.children if + def_group is not child and found_onset is not child] + + # Delay tag is checked for uniqueness elsewhere, so we can safely remove all of them + children = [child for child in children + if not isinstance(child, HedTag) or child.short_base_tag != DefTagNames.DELAY_KEY] + max_children = 1 + if found_onset.short_base_tag == DefTagNames.OFFSET_KEY: + max_children = 0 + if len(children) > max_children: + onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_WRONG_NUMBER_GROUPS, + def_tag, + found_group.children) + continue + + if children: + # Make this a loop if max_children can be > 1 + child = children[0] + if not isinstance(child, HedGroup): + onset_issues += ErrorHandler.format_error(TemporalErrors.ONSET_TAG_OUTSIDE_OF_GROUP, + child, + def_tag) + + # At this point we have either an onset or offset tag and it's name + onset_issues += self._handle_onset_or_offset(def_tag) + + return onset_issues + + def _find_onset_tags(self, hed_string_obj): + return hed_string_obj.find_top_level_tags(anchor_tags=DefTagNames.TEMPORAL_KEYS) + + def _handle_onset_or_offset(self, def_tag): + def_name, _, placeholder = def_tag.extension.partition('/') + + def_entry = self.defs.get(def_name.casefold()) + if def_entry is None: + return ErrorHandler.format_error(TemporalErrors.ONSET_DEF_UNMATCHED, tag=def_tag) + if bool(def_entry.takes_value) != bool(placeholder): + return ErrorHandler.format_error(TemporalErrors.ONSET_PLACEHOLDER_WRONG, tag=def_tag, + has_placeholder=bool(def_entry.takes_value)) + + return [] diff --git a/hed/validator/hed_validator.py b/hed/validator/hed_validator.py index 07c38892..3e7f89e4 100644 --- a/hed/validator/hed_validator.py +++ b/hed/validator/hed_validator.py @@ -5,7 +5,7 @@ from hed.errors import error_reporter from hed.validator.def_validator import DefValidator -from hed.validator.util import UnitValueValidator, CharValidator, StringValidator, TagValidator, GroupValidator +from hed.validator.util import UnitValueValidator, CharRexValidator, StringValidator, TagValidator, GroupValidator from hed.schema.hed_schema import HedSchema @@ -36,7 +36,7 @@ def __init__(self, hed_schema, def_dicts=None, definitions_allowed=False): self._validate_characters = hed_schema.schema_83_props self._unit_validator = UnitValueValidator(modern_allowed_char_rules=self._validate_characters) - self._char_validator = CharValidator(modern_allowed_char_rules=self._validate_characters) + self._char_validator = CharRexValidator(modern_allowed_char_rules=self._validate_characters) self._string_validator = StringValidator() self._tag_validator = TagValidator() self._group_validator = GroupValidator(hed_schema) @@ -158,6 +158,8 @@ def validate_units(self, original_tag, validate_text=None, report_as=None, error if validate_text is None: validate_text = original_tag.extension issues = [] + if validate_text == '#': + return [] if original_tag.is_unit_class_tag(): issues += self._unit_validator.check_tag_unit_class_units_are_valid(original_tag, validate_text, @@ -205,14 +207,15 @@ def _validate_individual_tags_in_hed_string(self, hed_string_obj, allow_placehol # run_individual_tag_validators(tag, allow_placeholders=allow_placeholders, # is_definition=is_definition) # else: - validation_issues += self._tag_validator. \ - run_individual_tag_validators(hed_tag, - allow_placeholders=allow_placeholders, - is_definition=is_definition) + validation_issues += \ + self._tag_validator.run_individual_tag_validators(hed_tag, allow_placeholders=allow_placeholders, + is_definition=is_definition) if (hed_tag.short_base_tag == DefTagNames.DEF_KEY or - hed_tag.short_base_tag == DefTagNames.DEF_EXPAND_KEY): - validation_issues += self._def_validator.validate_def_value_units(hed_tag, self) - else: + hed_tag.short_base_tag == DefTagNames.DEF_EXPAND_KEY): + validation_issues += self._def_validator.validate_def_value_units(hed_tag, self, allow_placeholders=allow_placeholders) + elif (hed_tag.short_base_tag == DefTagNames.DEFINITION_KEY) and hed_tag.extension.endswith("/#"): + validation_issues += self.validate_units(hed_tag, hed_tag.extension[:-2]) + elif not (allow_placeholders and '#' in hed_tag.extension): validation_issues += self.validate_units(hed_tag) return validation_issues diff --git a/hed/validator/util/__init__.py b/hed/validator/util/__init__.py index 0f108a3a..9d182bc9 100644 --- a/hed/validator/util/__init__.py +++ b/hed/validator/util/__init__.py @@ -1,6 +1,6 @@ """Validation of HED tags.""" -from .char_util import CharValidator +from .char_util import CharValidator, CharRexValidator from .string_util import StringValidator from .class_util import UnitValueValidator from .tag_util import TagValidator diff --git a/hed/validator/util/char_util.py b/hed/validator/util/char_util.py index 7cca86a8..7e1d9055 100644 --- a/hed/validator/util/char_util.py +++ b/hed/validator/util/char_util.py @@ -1,7 +1,13 @@ """ Classes responsible for basic character validation of a string or tag.""" +import json +import re +import os + from hed.errors.error_reporter import ErrorHandler from hed.errors.error_types import ValidationErrors +CLASS_REX_FILENAME = 'class_regex.json' + class CharValidator: """Class responsible for basic character level validation of a string or tag.""" @@ -152,3 +158,70 @@ def _report_invalid_character_error(hed_string, index): error_type = ValidationErrors.TILDES_UNSUPPORTED return ErrorHandler.format_error(error_type, char_index=index, source_string=hed_string) + + +class CharRexValidator(CharValidator): + """Class responsible for basic character level validation of a string or tag.""" + + def __init__(self, modern_allowed_char_rules=False): + """Does basic character validation for HED strings/tags + + Parameters: + modern_allowed_char_rules(bool): If True, use 8.3 style rules for unicode characters. + """ + super().__init__(modern_allowed_char_rules) + self._rex_dict = self._get_rex_dict() + + def get_problem_chars(self, input_string, class_name): + + # List to store problem indices and characters + bad_indices = [] + + # Retrieve the allowed character classes for the given class_name + allowed_classes = self._rex_dict["class_chars"].get(class_name, []) + if not allowed_classes: + return bad_indices + # Combine the corresponding regular expressions from the char_regex section + allowed_regex_parts = [self._rex_dict["char_regex"][char_class] for char_class in allowed_classes] + + # Create one combined regex that matches any of the allowed character classes + combined_regex = "|".join(allowed_regex_parts) + + # Compile the combined regular expression + compiled_regex = re.compile(combined_regex) + + # Iterate through the input string, checking each character + for index, char in enumerate(input_string): + # If the character doesn't match the combined regex, it's a problem + if not compiled_regex.match(char): + bad_indices.append((index, char)) + + return bad_indices + + def is_valid_value(self, input_string, class_name): + # Retrieve the allowed character classes for the given class_name + class_regex = self._rex_dict["class_words"].get(class_name, []) + if not class_regex: + return True + match = re.match(class_regex, input_string) + match = match if match else False + return match + + @staticmethod + def _get_rex_dict(): + current_dir = os.path.dirname(os.path.abspath(__file__)) + json_path = os.path.realpath(os.path.join(current_dir, CLASS_REX_FILENAME)) + with open(json_path, 'r', encoding='utf-8') as f: + return json.load(f) + + +if __name__ == "__main__": + # Example input string + input_string = "Hello World123" + + # Class name (e.g., "nameClass" or "testClass") + class_name = "nameClass" + + # Call the function and print the result + # problem_indices = get_problem_chars(input_string, class_name, json_data) + # print(problem_indices) diff --git a/hed/validator/util/class_regex.json b/hed/validator/util/class_regex.json new file mode 100644 index 00000000..81f49f02 --- /dev/null +++ b/hed/validator/util/class_regex.json @@ -0,0 +1,62 @@ +{ + "char_regex": { + "alphanumeric": "[A-Za-z0-9]", + "ampersand": "&", + "ascii": "[\\x00-\\x7F]", + "asterisk": "\\*", + "at-sign": "@", + "backslash": "\\", + "blank": " ", + "caret": "\\^", + "colon": ":", + "comma": ",", + "date-time": "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?", + "dollar": "\\$", + "digits": "[0-9]", + "double-quote": "\"", + "equals": "=", + "exclamation": "!", + "greater-than": ">", + "hyphen": "-", + "left-paren": "(", + "less-than": "<", + "letters": "[A-Za-z]", + "lowercase": "[a-z]", + "name": "[\\w\\-\\u0080-\\uFFFF]", + "newline": "\\n", + "nonascii": "[\\u0080-\\uFFFF]", + "number-sign": "#", + "numeric": "[0-9.\\-+^Ee]", + "percent-sign": "%", + "period": "\\.", + "plus": "\\+", + "printable": "[\\x20-\\x7E]", + "question-mark": "\\?", + "right-paren": "(", + "semicolon": ";", + "single-quote": "'", + "forward-slash": "/", + "tab": "\\t", + "text": "[^\\x00-\\x1F\\x7F,{}]", + "tilde": "~", + "underscore": "_", + "uppercase": "[A-Z]", + "vertical-bar": "|" + }, + "class_chars": { + "dateTimeClass": [], + "nameClass": [ + "alphanumeric", + "underscore", + "hyphen", + "nonascii" + ], + "numericClass": [], + "textClass": ["text"], + "testClass": ["newline", "tab", "nonascii"] + }, + "class_words": { + "dateTimeClass": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$", + "numericClass": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$" + } +} \ No newline at end of file diff --git a/hed/validator/util/class_util.py b/hed/validator/util/class_util.py index efdc90c4..a4168ec0 100644 --- a/hed/validator/util/class_util.py +++ b/hed/validator/util/class_util.py @@ -1,11 +1,13 @@ """ Utilities to support HED validation. """ import datetime import re +import json from hed.schema import schema_validation_util from hed.schema import schema_validation_util_deprecated from hed.errors.error_reporter import ErrorHandler from hed.errors.error_types import ValidationErrors +from hed.validator.util.char_util import CharRexValidator class UnitValueValidator: @@ -24,8 +26,10 @@ def __init__(self, modern_allowed_char_rules=False, value_validators=None): value_validators(dict or None): Override or add value class validators """ + self._validate_characters = modern_allowed_char_rules self._value_validators = self._get_default_value_class_validators() + self._char_validator = CharRexValidator() if value_validators and isinstance(value_validators, dict): self._value_validators.update(value_validators) @@ -36,10 +40,10 @@ def _get_default_value_class_validators(self): dict: Dictionary of value class validator functions. """ validator_dict = { - self.DATE_TIME_VALUE_CLASS: is_date_time, - self.NUMERIC_VALUE_CLASS: validate_numeric_value_class, - self.TEXT_VALUE_CLASS: validate_text_value_class, - self.NAME_VALUE_CLASS: validate_text_value_class + self.DATE_TIME_VALUE_CLASS: is_date_time_value_class, + self.NUMERIC_VALUE_CLASS: is_numeric_value_class, + self.TEXT_VALUE_CLASS: is_text_value_class, + self.NAME_VALUE_CLASS: is_name_value_class } return validator_dict @@ -96,28 +100,72 @@ def check_tag_value_class_valid(self, original_tag, validate_text, report_as=Non """ return self._check_value_class(original_tag, validate_text, report_as, error_code, index_offset) - @staticmethod - def _get_tag_problem_indexes(original_tag, stripped_value, validate_characters): - """ Return list of problem indices for error messages. - - Parameters: - original_tag (HedTag): The original tag that is used to report the error. - stripped_value (str): value without units - - Returns: - list: List of int locations in which error occurred. - """ - indexes = [] - # Extra +1 for the slash - start_index = original_tag.extension.find(stripped_value) + len(original_tag.org_base_tag) + 1 - if start_index == -1: - return indexes - - if validate_characters: - allowed_characters = schema_validation_util.get_allowed_characters(original_tag.value_classes.values()) - return schema_validation_util.get_problem_indexes(stripped_value, allowed_characters, index_adj=start_index) - else: - return schema_validation_util_deprecated._get_disallowed_character_indexes(stripped_value, start_index) + # def _get_tag_problem_indexes(self, original_tag, stripped_value, validation=True): + # """ Return list of problem indices for error messages. + # + # Parameters: + # original_tag (HedTag): The original tag that is used to report the error. + # stripped_value (str): value without units + # validation (bool): + # + # Returns: + # list: List of int locations in which error occurred. + # """ + # indexes = [] + # # Extra +1 for the slash + # start_index = original_tag.extension.find(stripped_value) + len(original_tag.org_base_tag) + 1 + # if start_index == -1: + # return indexes + # + # if not validation: + # return schema_validation_util_deprecated._get_disallowed_character_indexes(stripped_value, start_index) + # + # return self._get_problem_indices(stripped_value, "nameClass", start_index=start_index) + # classes = list(original_tag.value_classes.keys()) + # problems = {} + # okay_count = len(classes) + # for class_name in classes: + # indices = self._char_validator.get_problem_chars(stripped_value, class_name) + # if indices: + # problems[class_name] = [(char, index + start_index) for index, char in indices] + # else: + # okay_count -= 1 + # if okay_count: # At least one value class has an issue + # return problems + # else: + # return {} + + def _get_problem_indices(self, stripped_value, class_name, start_index=0): + indices = self._char_validator.get_problem_chars(stripped_value, class_name) + if indices: + indices = [(char, index + start_index) for index, char in indices] + return indices + # value_classes = original_tag.value_classes.values() + # allowed_characters = schema_validation_util.get_allowed_characters(original_tag.value_classes.values()) + + # return schema_validation_util.get_problem_indexes(stripped_value, allowed_characters, index_adj=start_index) + + # @staticmethod + # def get_problem_index(validation_string, reg_ex, index_adj=0): + # """Finds indexes with values not in character set + # + # Parameters: + # validation_string(str): The string to check characters in + # character_set(set): the list of valid characters(or the value "nonascii" as a set entry) + # index_adj(int): the value to adjust the reported indices by, if this isn't the start of a string. + # + # Returns: + # index_list(tuple of (str, int)): The list of problematic characters and indices + # """ + # invalid_positions = [] + # + # # Iterate over the string, check each character + # for i, char in enumerate(validation_string): + # if not re.match(reg_ex, char): + # # If the character does not match, record its position and value + # invalid_positions.append((i, char)) + # + # return invalid_positions def _check_value_class(self, original_tag, stripped_value, report_as, error_code=None, index_offset=0): """ Return any issues found if this is a value tag, @@ -134,25 +182,98 @@ def _check_value_class(self, original_tag, stripped_value, report_as, error_code """ + + if not original_tag.is_takes_value_tag(): + return [] + + classes = list(original_tag.value_classes.keys()) + if not classes: + return [] + start_index = original_tag.extension.find(stripped_value) + len(original_tag.org_base_tag) + 1 + + report_as = report_as if report_as else original_tag + class_valid = {} + for class_name in classes: + class_valid[class_name] = self._char_validator.is_valid_value(stripped_value, class_name) + + char_errors = {} + for class_name in classes: + char_errors[class_name] = self._get_problem_indices(stripped_value, class_name, start_index=start_index) + if class_valid[class_name] and not char_errors[class_name]: # We have found a valid class + return [] + index_adj = len(report_as.org_base_tag) - len(original_tag.org_base_tag) + validation_issues = self.report_value_errors(char_errors, class_valid, report_as, index_adj) + return validation_issues + + @staticmethod + def report_value_errors(error_dict, class_valid, report_as, index_adj): + validation_issues = [] + for class_name, errors in error_dict.items(): + if not errors and class_valid[class_name]: + continue + elif not class_valid[class_name]: + validation_issues += ErrorHandler.format_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, + index_in_tag=0, index_in_tag_end=len(report_as.org_tag), + value_class=class_name, tag=report_as) + elif errors: + validation_issues.extend(UnitValueValidator.report_value_char_errors(class_name, errors, + report_as, index_adj)) + return validation_issues + + @staticmethod + def report_value_char_errors(class_name, errors, report_as, index_adj): validation_issues = [] - if original_tag.is_takes_value_tag(): - report_as = report_as if report_as else original_tag - problem_indexes = self._get_tag_problem_indexes(original_tag, stripped_value, self._validate_characters) - for char, index in problem_indexes: - tag_code = ValidationErrors.CURLY_BRACE_UNSUPPORTED_HERE if ( - char in "{}") else ValidationErrors.INVALID_TAG_CHARACTER - - index_adj = len(report_as.org_base_tag) - len(original_tag.org_base_tag) - index += index_adj + index_offset - validation_issues += ErrorHandler.format_error(tag_code, + for value in errors: + index = value[1] + index_adj + if value[0] in "{}": + validation_issues += ErrorHandler.format_error(ValidationErrors.CURLY_BRACE_UNSUPPORTED_HERE, tag=report_as, index_in_tag=index, index_in_tag_end=index + 1) - if not self._validate_value_class_portion(original_tag, stripped_value): - validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, report_as) - if error_code: - validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, - report_as, actual_error=error_code) + else: + validation_issues += ErrorHandler.format_error(ValidationErrors.INVALID_VALUE_CLASS_CHARACTER, + value_class=class_name, tag=report_as, + index_in_tag=index, index_in_tag_end=index + 1) return validation_issues + # @staticmethod + # def report_class_errors(error_dict, report_as): + # validation_issues = [] + # for class_name, errors in error_dict.items(): + + # def _check_value_class(self, original_tag, stripped_value, report_as, error_code=None, index_offset=0): + + # """ Return any issues found if this is a value tag, + # + # Parameters: + # original_tag (HedTag): The original tag that is used to report the error. + # stripped_value (str): value without units + # report_as (HedTag): Report as this tag. + # error_code(str): The code to override the error as. Again mostly for def/def-expand tags. + # index_offset(int): Offset into the extension validate_text starts at. + # + # Returns: + # list: List of dictionaries of validation issues. + # + # """ + # + # validation_issues = [] + # if original_tag.is_takes_value_tag(): + # report_as = report_as if report_as else original_tag + # problem_indexes = self._get_tag_problem_indexes(original_tag, stripped_value, self._validate_characters) + # for char, index in problem_indexes: + # tag_code = ValidationErrors.CURLY_BRACE_UNSUPPORTED_HERE if ( + # char in "{}") else ValidationErrors.INVALID_TAG_CHARACTER + # + # index_adj = len(report_as.org_base_tag) - len(original_tag.org_base_tag) + # index += index_adj + index_offset + # validation_issues += ErrorHandler.format_error(tag_code, + # tag=report_as, index_in_tag=index, + # index_in_tag_end=index + 1) + # if not self._validate_value_class_portion(original_tag, stripped_value): + # validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, report_as) + # if error_code: + # validation_issues += ErrorHandler.format_error(ValidationErrors.VALUE_INVALID, + # report_as, actual_error=error_code) + # return validation_issues @staticmethod def _check_units(original_tag, bad_units, report_as): @@ -206,7 +327,20 @@ def validate_value_class_type(self, unit_or_value_portion, valid_types): return not has_valid_func -def is_date_time(date_time_string): +def find_invalid_positions(s, pattern): + # List to store positions of invalid characters + invalid_positions = [] + + # Iterate over the string, check each character + for i, char in enumerate(s): + if not re.match(pattern, char): + # If the character does not match, record its position and value + invalid_positions.append((i, char)) + + return invalid_positions + + +def is_date_time_value_class(date_time_string): """Check if the specified string is a valid datetime. Parameters: @@ -226,7 +360,15 @@ def is_date_time(date_time_string): return False -def validate_numeric_value_class(numeric_string): +def is_name_value_class(name_str): + pattern = r'^[\w\-\u0080-\uFFFF]+$' + if re.fullmatch(pattern, name_str): + return True + else: + return False + + +def is_numeric_value_class(numeric_string): """ Check to see if valid numeric value. Parameters: @@ -242,7 +384,7 @@ def validate_numeric_value_class(numeric_string): return False -def validate_text_value_class(text_string): +def is_text_value_class(text_string): """ Placeholder for eventual text value class validation. Parameters: diff --git a/spec_tests/test_errors.py b/spec_tests/test_errors.py index 2537bc23..c1a209ee 100644 --- a/spec_tests/test_errors.py +++ b/spec_tests/test_errors.py @@ -16,9 +16,10 @@ skip_tests = { "VERSION_DEPRECATED": "Not applicable", - "tag-extension-invalid-bad-node-name": "Part of character invalid checking/didn't get to it yet", + # "tag-extension-invalid-bad-node-name": "Part of character invalid checking/didn't get to it yet", "curly-braces-has-no-hed": "Need to fix issue #1006", - "character-invalid-non-printing appears": "Need to recheck how this is verified for textClass" + # "character-invalid-non-printing appears": "Need to recheck how this is verified for textClass", + "invalid-character-name-value-class-deprecated": "Removing support for 8.2.0 or earlier name classes" } @@ -42,6 +43,7 @@ def run_single_test(self, test_file): test_info = json.load(fp) for info in test_info: error_code = info['error_code'] + all_codes = [error_code] + info.get('alt_codes', []) if error_code in skip_tests: print(f"Skipping {error_code} test because: {skip_tests[error_code]}") continue @@ -64,30 +66,32 @@ def run_single_test(self, test_file): if not issues: issues += [{"code": e.code, "message": e.message}] - self.report_result("fails", issues, error_code, description, name, "dummy", "Schema") + self.report_result("fails", issues, error_code, all_codes, description, name, "dummy", "Schema") # self.fail_count.append(name) continue definitions = info.get('definitions', None) def_dict = DefinitionDict(definitions, schema) self.assertFalse(def_dict.issues) + else: def_dict = DefinitionDict() for section_name, section in info["tests"].items(): if section_name == "string_tests": - self._run_single_string_test(section, schema, def_dict, error_code, + self._run_single_string_test(section, schema, def_dict, error_code, all_codes, description, name, error_handler) if section_name == "sidecar_tests": - self._run_single_sidecar_test(section, schema, def_dict, error_code, + self._run_single_sidecar_test(section, schema, def_dict, error_code, all_codes, description, name, error_handler) if section_name == "event_tests": - self._run_single_events_test(section, schema, def_dict, error_code, + self._run_single_events_test(section, schema, def_dict, error_code, all_codes, description, name, error_handler) if section_name == "combo_tests": - self._run_single_combo_test(section, schema, def_dict, error_code, description, name, error_handler) + self._run_single_combo_test(section, schema, def_dict, error_code, all_codes, + description, name, error_handler) if section_name == "schema_tests": - self._run_single_schema_test(section, error_code, description, name, error_handler) + self._run_single_schema_test(section, error_code, all_codes, description, name, error_handler) - def report_result(self, expected_result, issues, error_code, description, name, test, test_type): + def report_result(self, expected_result, issues, error_code, all_codes, description, name, test, test_type): # Filter out pre-release warnings, we don't care about them. issues = [issue for issue in issues if issue["code"] != SchemaWarnings.SCHEMA_PRERELEASE_VERSION_USED] if expected_result == "fails": @@ -97,9 +101,9 @@ def report_result(self, expected_result, issues, error_code, description, name, print(get_printable_issue_string(issues)) self.fail_count.append(name) else: - if any(issue['code'] == error_code for issue in issues): + if any(issue['code'] in all_codes for issue in issues): return - print(f"{error_code}: {description}") + print(f"{error_code}: {description} all codes:[{str(all_codes)}]") print(f"Failed '{test_type}' (unexpected errors found) '{name}': {test}") print(get_printable_issue_string(issues)) self.fail_count.append(name) @@ -110,7 +114,7 @@ def report_result(self, expected_result, issues, error_code, description, name, print(get_printable_issue_string(issues)) self.fail_count.append(name) - def _run_single_string_test(self, info, schema, def_dict, error_code, description, name, error_handler): + def _run_single_string_test(self, info, schema, def_dict, error_code, all_codes, description, name, error_handler): string_validator = HedValidator(hed_schema=schema, def_dicts=def_dict) for result, tests in info.items(): for test in tests: @@ -119,18 +123,18 @@ def _run_single_string_test(self, info, schema, def_dict, error_code, descriptio issues = string_validator.run_basic_checks(test_string, False) issues += string_validator.run_full_string_checks(test_string) error_handler.add_context_and_filter(issues) - self.report_result(result, issues, error_code, description, name, test, "string_test") + self.report_result(result, issues, error_code, all_codes, description, name, test, "string_test") - def _run_single_sidecar_test(self, info, schema, def_dict, error_code, description, name, error_handler): + def _run_single_sidecar_test(self, info, schema, def_dict, error_code, all_codes, description, name, error_handler): for result, tests in info.items(): for test in tests: - print(f"{error_code}: {name}") + # print(f"{error_code}: {name}") buffer = io.BytesIO(json.dumps(test).encode("utf-8")) sidecar = Sidecar(buffer) issues = sidecar.validate(hed_schema=schema, extra_def_dicts=def_dict, error_handler=error_handler) - self.report_result(result, issues, error_code, description, name, test, "sidecar_test") + self.report_result(result, issues, error_code, all_codes, description, name, test, "sidecar_test") - def _run_single_events_test(self, info, schema, def_dict, error_code, description, name, error_handler): + def _run_single_events_test(self, info, schema, def_dict, error_code, all_codes, description, name, error_handler): from hed import TabularInput for result, tests in info.items(): for test in tests: @@ -149,9 +153,9 @@ def _run_single_events_test(self, info, schema, def_dict, error_code, descriptio file = TabularInput(file_obj, sidecar=self.default_sidecar) issues = file.validate(hed_schema=schema, extra_def_dicts=def_dict, error_handler=error_handler) - self.report_result(result, issues, error_code, description, name, test, "events_test") + self.report_result(result, issues, error_code, all_codes, description, name, test, "events_test") - def _run_single_combo_test(self, info, schema, def_dict, error_code, description, name, error_handler): + def _run_single_combo_test(self, info, schema, def_dict, error_code, all_codes, description, name, error_handler): from hed import TabularInput for result, tests in info.items(): for test in tests: @@ -181,9 +185,9 @@ def _run_single_combo_test(self, info, schema, def_dict, error_code, description print(f"This is probably a missing set of square brackets.") continue issues += file.validate(hed_schema=schema, extra_def_dicts=def_dict, error_handler=error_handler) - self.report_result(result, issues, error_code, description, name, test, "combo_tests") + self.report_result(result, issues, error_code, all_codes, description, name, test, "combo_tests") - def _run_single_schema_test(self, info, error_code, description, name, error_handler): + def _run_single_schema_test(self, info, error_code, all_codes, description, name, error_handler): for result, tests in info.items(): for test in tests: schema_string = "\n".join(test) @@ -199,15 +203,18 @@ def _run_single_schema_test(self, info, error_code, description, name, error_han except urllib.error.HTTPError: issues += [{"code": "Http_error", "message": "HTTP error in testing, probably due to rate limiting for local testing."}] - self.report_result(result, issues, error_code, description, name, test, "schema_tests") + self.report_result(result, issues, error_code, all_codes, description, name, test, "schema_tests") def test_errors(self): for test_file in self.test_files: self.run_single_test(test_file) + #test_file = './temp.json' + self.run_single_test(test_file) print(f"{len(self.fail_count)} tests got an unexpected result") print("\n".join(self.fail_count)) self.assertEqual(len(self.fail_count), 0) if __name__ == '__main__': + unittest.main() diff --git a/tests/validator/test_char_validator.py b/tests/validator/test_char_validator.py new file mode 100644 index 00000000..108699f4 --- /dev/null +++ b/tests/validator/test_char_validator.py @@ -0,0 +1,46 @@ +import unittest +from hed.validator.util.char_util import CharRexValidator + + +class TestGetProblemIndices(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls.char_rex_val = CharRexValidator() + + def test_nameClass_valid_string(self): + # Only uppercase and lowercase letters allowed for nameClass + self.assertEqual(self.char_rex_val.get_problem_chars("HelloWorld", "nameClass"), []) + + def test_nameClass_with_invalid_characters(self): + # Invalid characters in "nameClass": space + self.assertEqual(self.char_rex_val.get_problem_chars("Hello World123#", "nameClass"), + [(5, ' '), (14, '#')]) + + def test_nameClass_with_special_characters(self): + # Invalid special characters in "nameClass" + self.assertEqual(self.char_rex_val.get_problem_chars("Invalid@String!", "nameClass"), + [(7, '@'), (14, '!')]) + + def test_testClass_with_newline_and_tab(self): + # "testClass" allows newline, tab, and non-ASCII characters but not ascii + self.assertEqual(self.char_rex_val.get_problem_chars("Hello\nWor\t你好", "testClass"), + [(0, 'H'), (1, 'e'), (2, 'l'), (3, 'l'), (4, 'o'), (6, 'W'), (7, 'o'), (8, 'r')]) + + def test_testClass_with_invalid_characters(self): + # Invalid characters in "testClass": ASCII letters and digits not allowed + self.assertEqual(self.char_rex_val.get_problem_chars("Hello123", "testClass"), + [(0, 'H'), (1, 'e'), (2, 'l'), (3, 'l'), (4, 'o'), (5, '1'), (6, '2'), (7, '3')]) + + def test_empty_string(self): + # Empty string should always return an empty list + self.assertEqual(self.char_rex_val.get_problem_chars("", "nameClass"), []) + + def test_nameClass_nonascii_characters(self): + # Non-ASCII characters are allowed in "nameClass" but $ an ! are not + self.assertEqual(self.char_rex_val.get_problem_chars("Hello$你好!", "nameClass"), [(5, '$'), (8, '!')]) + + +# Run the tests +if __name__ == "__main__": + unittest.main(argv=[''], exit=False) \ No newline at end of file diff --git a/tests/validator/test_tag_validator.py b/tests/validator/test_tag_validator.py index e385e1f5..26d5b83c 100644 --- a/tests/validator/test_tag_validator.py +++ b/tests/validator/test_tag_validator.py @@ -1,1040 +1,1046 @@ -import unittest - -from hed.errors.error_types import ValidationErrors, DefinitionErrors, TemporalErrors -from tests.validator.test_tag_validator_base import TestValidatorBase -from hed.schema.hed_schema_io import load_schema_version -from functools import partial - - -#todo: update these tests(TagValidator no longer exists) -class TestHed(TestValidatorBase): - schema_file = "../data/schema_tests/HED8.2.0.mediawiki" - - -class IndividualHedTagsShort(TestHed): - hed_schema = load_schema_version("score_1.1.0") - @staticmethod - def string_obj_func(validator): - return partial(validator._validate_individual_tags_in_hed_string) - - def test_exist_in_schema(self): - test_strings = { - 'takesValue': 'Duration/3 ms', - 'full': 'Animal-agent', - 'extensionsAllowed': 'Item/Beaver', - 'leafExtension': 'Experiment-procedure/Something', - 'nonExtensionsAllowed': 'Event/Nonsense', - 'invalidExtension': 'Agent/Red', - 'invalidExtension2': 'Agent/Red/Extension2', - 'usedToBeIllegalComma': 'Label/This is a label,This/Is/A/Tag', - 'legalDef': 'Def/Item', - 'legalDefExpand': 'Def-expand/Item', - 'illegalDefinition': 'Definition/Item', - } - expected_results = { - 'takesValue': True, - 'full': True, - 'extensionsAllowed': True, - 'leafExtension': False, - 'nonExtensionsAllowed': False, - 'invalidExtension': False, - 'invalidExtension2': False, - 'usedToBeIllegalComma': False, - 'legalDef': True, - 'legalDefExpand': True, - 'illegalDefinition': False, - } - expected_issues = { - 'takesValue': [], - 'full': [], - 'extensionsAllowed': [], - 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), - 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), - 'invalidExtension': self.format_error( - ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=6, index_in_tag_end=9, - expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + - "/Color/CSS-color/Red-color/Red"), - 'invalidExtension2': self.format_error( - ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=6, index_in_tag_end=9, - expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + - "/Color/CSS-color/Red-color/Red"), - 'usedToBeIllegalComma': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, tag=1, - index_in_tag=0, index_in_tag_end=4), - 'legalDef': [], - 'legalDefExpand': [], - 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0) - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_proper_capitalization(self): - test_strings = { - 'proper': 'Event/Sensory-event', - 'camelCase': 'EvEnt/Sensory-event', - 'takesValue': 'Sampling-rate/20 Hz', - 'numeric': 'Statistical-uncertainty/20', - 'lowercase': 'Event/sensory-event' - } - expected_results = { - 'proper': True, - 'camelCase': True, - 'takesValue': True, - 'numeric': True, - 'lowercase': False - } - expected_issues = { - 'proper': [], - 'camelCase': [], - 'takesValue': [], - 'numeric': [], - 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - # def test_proper_capitalization(self): - # test_strings = { - # 'proper': 'Event/Sensory-event', - # 'camelCase': 'EvEnt/Something', - # 'takesValue': 'Sampling-rate/20 Hz', - # 'numeric': 'Statistical-uncertainty/20', - # 'lowercase': 'Event/something', - # 'multipleUpper': 'Event/SomeThing' - # } - # expected_results = { - # 'proper': True, - # 'camelCase': False, - # 'takesValue': True, - # 'numeric': True, - # 'lowercase': False, - # 'multipleUpper': False - # } - # expected_issues = { - # 'proper': [], - # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), - # 'takesValue': [], - # 'numeric': [], - # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), - # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) - # } - # self.validator_semantic(test_strings, expected_results, expected_issues, True) - # - # def test_proper_capitalization_semantic(self): - # test_strings = { - # 'proper': 'Event/Sensory-event', - # 'camelCase': 'EvEnt/Sensory-event', - # 'takesValue': 'Sampling-rate/20 Hz', - # 'numeric': 'Statistical-uncertainty/20', - # 'lowercase': 'Event/sensory-event', - # 'multipleUpper': 'Event/Sensory-Event' - # } - # expected_results = { - # 'proper': True, - # 'camelCase': False, - # 'takesValue': True, - # 'numeric': True, - # 'lowercase': False, - # 'multipleUpper': False - # } - # expected_issues = { - # 'proper': [], - # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), - # 'takesValue': [], - # 'numeric': [], - # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), - # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) - # } - # self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_child_required(self): - test_strings = { - 'hasChild': 'Experimental-stimulus', - 'missingChild': 'Label' - } - expected_results = { - 'hasChild': True, - 'missingChild': False - } - expected_issues = { - 'hasChild': [], - 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_required_units(self): - test_strings = { - 'hasRequiredUnit': 'Duration/3 ms', - 'missingRequiredUnit': 'Duration/3', - 'notRequiredNoNumber': 'Age', - 'notRequiredNumber': 'Age/0.5', - 'notRequiredScientific': 'Age/5.2e-1', - 'timeValue': 'Clock-face/08:30', - # Update test - This one is currently marked as valid because clock face isn't in hed3 - 'invalidTimeValue': 'Clock-face/8:30', - } - expected_results = { - 'hasRequiredUnit': True, - 'missingRequiredUnit': False, - 'notRequiredNoNumber': True, - 'notRequiredNumber': True, - 'notRequiredScientific': True, - 'timeValue': False, - 'invalidTimeValue': False, - } - # legal_clock_time_units = ['hour:min', 'hour:min:sec'] - expected_issues = { - 'hasRequiredUnit': [], - 'missingRequiredUnit': self.format_error(ValidationErrors.UNITS_MISSING, tag=0, - default_unit='s'), - 'notRequiredNoNumber': [], - 'notRequiredNumber': [], - 'notRequiredScientific': [], - 'timeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, - index_in_tag=10, index_in_tag_end=None), - 'invalidTimeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, - index_in_tag=10, index_in_tag_end=None), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_correct_units(self): - test_strings = { - # 'correctUnit': 'Duration/3 ms', - # 'correctUnitScientific': 'Duration/3.5e1 ms', - # 'correctPluralUnit': 'Duration/3 milliseconds', - # 'correctNoPluralUnit': 'Frequency/3 hertz', - # 'correctNonSymbolCapitalizedUnit': 'Duration/3 MilliSeconds', - # 'correctSymbolCapitalizedUnit': 'Frequency/3 kHz', - 'incorrectUnit': 'Duration/3 cm', - 'incorrectSiUsage': 'Duration/3 decaday', - 'incorrectPluralUnit': 'Frequency/3 hertzs', - 'incorrectSymbolCapitalizedUnit': 'Frequency/3 hz', - 'incorrectSymbolCapitalizedUnitModifier': 'Frequency/3 KHz', - 'notRequiredNumber': 'Statistical-accuracy/0.5', - 'notRequiredScientific': 'Statistical-accuracy/5e-1', - 'specialAllowedCharBadUnit': 'Creation-date/bad_date', - 'specialAllowedCharUnit': 'Creation-date/1900-01-01T01:01:01', - # todo: restore these when we have a currency node in the valid beta schema. - # 'specialAllowedCharCurrency': 'Event/Currency-Test/$100', - # 'specialNotAllowedCharCurrency': 'Event/Currency-Test/@100' - # Update tests - 8.0 currently has no clockTime nodes. - # 'properTime': 'Item/2D shape/Clock face/08:30', - # 'invalidTime': 'Item/2D shape/Clock face/54:54' - 'voltsTest1': 'Finding-amplitude/30 v', - 'voltsTest2': 'Finding-amplitude/30 Volt', - 'voltsTest3': 'Finding-amplitude/30 volts', - 'voltsTest4': 'Finding-amplitude/30 VOLTS', - 'voltsTest5': 'Finding-amplitude/30 kv', - 'voltsTest6': 'Finding-amplitude/30 kiloVolt', - 'voltsTest7': 'Finding-amplitude/30 KiloVolt', - 'volumeTest1': "Sound-volume/5 dB", - 'volumeTest2': "Sound-volume/5 kdB", # Invalid, not SI unit - 'volumeTest3': "Sound-volume/5 candela", - 'volumeTest4': "Sound-volume/5 kilocandela", - 'volumeTest5': "Sound-volume/5 cd", - 'volumeTest6': "Sound-volume/5 kcd", - 'volumeTest7': "Sound-volume/5 DB", # Invalid, case doesn't match - } - expected_results = { - 'correctUnit': True, - 'correctUnitScientific': True, - 'correctPluralUnit': True, - 'correctNoPluralUnit': True, - 'correctNonSymbolCapitalizedUnit': True, - 'correctSymbolCapitalizedUnit': True, - 'incorrectUnit': False, - 'incorrectSiUsage': False, - 'incorrectPluralUnit': False, - 'incorrectSymbolCapitalizedUnit': False, - 'incorrectSymbolCapitalizedUnitModifier': False, - 'notRequiredNumber': True, - 'notRequiredScientific': True, - 'specialAllowedCharBadUnit': False, - 'specialAllowedCharUnit': True, - # 'properTime': True, - # 'invalidTime': True, - # 'specialAllowedCharCurrency': True, - # 'specialNotAllowedCharCurrency': False, - 'voltsTest1': True, - 'voltsTest2': True, - 'voltsTest3': True, - 'voltsTest4': True, - 'voltsTest5': True, - 'voltsTest6': True, - 'voltsTest7': True, - 'volumeTest1': True, - 'volumeTest2': False, - 'volumeTest3': True, - 'volumeTest4': True, - 'volumeTest5': True, - 'volumeTest6': True, - 'volumeTest7': False, - } - legal_time_units = ['s', 'second', 'day', 'minute', 'hour'] - # legal_clock_time_units = ['hour:min', 'hour:min:sec'] - # legal_datetime_units = ['YYYY-MM-DDThh:mm:ss'] - legal_freq_units = ['Hz', 'hertz'] - # legal_currency_units = ['dollar', "$", "point"] - legal_intensity_units = ["candela", "cd", "dB"] - - expected_issues = { - 'correctUnit': [], - 'correctUnitScientific': [], - 'correctPluralUnit': [], - 'correctNoPluralUnit': [], - 'correctNonSymbolCapitalizedUnit': [], - 'correctSymbolCapitalizedUnit': [], - 'incorrectUnit': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, units=legal_time_units), - 'incorrectSiUsage': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, units=legal_time_units), - 'incorrectPluralUnit': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, units=legal_freq_units), - 'incorrectSymbolCapitalizedUnit': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, - units=legal_freq_units), - 'incorrectSymbolCapitalizedUnitModifier': self.format_error( - ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), - 'notRequiredNumber': [], - 'notRequiredScientific': [], - 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.VALUE_INVALID, - tag=0), - 'specialAllowedCharUnit': [], - # 'properTime': [], - # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, - # units=legal_clock_time_units) - # 'specialAllowedCharCurrency': [], - # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, - # tag=0, - # units=legal_currency_units), - 'voltsTest1': [], - 'voltsTest2': [], - 'voltsTest3': [], - 'voltsTest4': [], - 'voltsTest5': [], - 'voltsTest6': [], - 'voltsTest7': [], - 'volumeTest1': [], - 'volumeTest2': self.format_error(ValidationErrors.UNITS_INVALID,tag=0, units=legal_intensity_units), - 'volumeTest3': [], - 'volumeTest4': [], - 'volumeTest5': [], - 'volumeTest6': [], - 'volumeTest7': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_intensity_units), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_extensions(self): - test_strings = { - 'invalidExtension': 'Experiment-control/Animal-agent', - } - expected_results = { - 'invalidExtension': False, - } - expected_issues = { - 'invalidExtension': self.format_error(ValidationErrors.INVALID_PARENT_NODE, tag=0, - index_in_tag=19, index_in_tag_end=31, - expected_parent_tag="Agent/Animal-agent"), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_extension_warning(self): - test_strings = { - 'noWarning': "Condition-variable/ValidExt", - 'warning': "Task-property/WarningExt" - } - expected_results = { - 'noWarning': True, - 'warning': False, - } - expected_issues = { - 'noWarning': [], - 'warning': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, - index_in_tag=13, index_in_tag_end=None), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_invalid_placeholder_in_normal_string(self): - test_strings = { - 'invalidPlaceholder': 'Duration/# ms', - 'invalidMiscPoundSign': 'Du#ation/20 ms', - 'invalidAfterBaseTag': 'Action/Invalid#/InvalidExtension' - } - expected_results = { - 'invalidPlaceholder': False, - 'invalidMiscPoundSign': False, - 'invalidAfterBaseTag': False, - } - expected_issues = { - 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, - tag=0, index_in_tag=9, index_in_tag_end=10, - actual_error=ValidationErrors.PLACEHOLDER_INVALID), - 'invalidMiscPoundSign': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, - tag=0, index_in_tag=0, index_in_tag_end=8), - 'invalidAfterBaseTag': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, - tag=0, index_in_tag=14, index_in_tag_end=15, - actual_error=ValidationErrors.PLACEHOLDER_INVALID), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_span_reporting(self): - test_strings = { - 'orgTagDifferent': 'Duration/23 hz', - 'orgTagDifferent2': 'Duration/23 hz, Duration/23 hz', - } - expected_results = { - 'orgTagDifferent': False, - 'orgTagDifferent2': False, - } - tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] - expected_issues = { - 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, units=tag_unit_class_units), - 'orgTagDifferent2': - self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, units=tag_unit_class_units) - + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, - units=tag_unit_class_units), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class TestTagLevels(TestHed): - @staticmethod - def string_obj_func(validator): - return validator._group_validator.run_tag_level_validators - - def test_no_duplicates(self): - test_strings = { - 'topLevelDuplicate': 'Event/Sensory-event,Event/Sensory-event', - 'groupDuplicate': 'Item/Object/Man-made-object/VehicleTrain,(Event/Sensory-event,' - 'Purple-color/Purple,Event/Sensory-event)', - 'noDuplicate': 'Event/Sensory-event,' - 'Item/Object/Man-made-object/VehicleTrain,' - 'Purple-color/Purple', - 'legalDuplicate': 'Item/Object/Man-made-object/VehicleTrain,(Item/Object/Man-made-object/VehicleTrain,' - 'Event/Sensory-event)', - 'duplicateGroup': 'Sensory-event, (Sensory-event, Man-made-object/VehicleTrain),' - '(Man-made-object/VehicleTrain, Sensory-event)', - 'duplicateSubGroup': 'Sensory-event, (Event, (Sensory-event, Man-made-object/VehicleTrain)),' - '(Event, (Man-made-object/VehicleTrain, Sensory-event))', - 'duplicateSubGroupF': 'Sensory-event, ((Sensory-event, Man-made-object/VehicleTrain), Event),' - '((Man-made-object/VehicleTrain, Sensory-event), Event)' - } - expected_results = { - 'topLevelDuplicate': False, - 'groupDuplicate': False, - 'legalDuplicate': True, - 'noDuplicate': True, - 'duplicateGroup': False, - 'duplicateSubGroup': False, - 'duplicateSubGroupF': False, - } - from hed import HedString - expected_issues = { - 'topLevelDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), - 'groupDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=3), - 'legalDuplicate': [], - 'noDuplicate': [], - 'duplicateGroup': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, - group=HedString("(Sensory-event, Man-made-object/VehicleTrain)", self.hed_schema)), - 'duplicateSubGroup': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, - group=HedString("(Event,(Sensory-event,Man-made-object/VehicleTrain))", self.hed_schema)), - 'duplicateSubGroupF': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, - group=HedString("((Sensory-event,Man-made-object/VehicleTrain),Event)", self.hed_schema)), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_no_duplicates_semantic(self): - test_strings = { - 'mixedLevelDuplicates': 'Man-made-object/Vehicle/Boat, Vehicle/Boat', - 'mixedLevelDuplicates2': 'Man-made-object/Vehicle/Boat, Boat' - } - expected_results = { - 'mixedLevelDuplicates': False, - 'mixedLevelDuplicates2': False, - } - expected_issues = { - 'mixedLevelDuplicates': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), - 'mixedLevelDuplicates2': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_topLevelTagGroup_validation(self): - test_strings = { - 'invalid1': 'Definition/InvalidDef', - 'valid1': '(Definition/ValidDef)', - 'valid2': '(Definition/ValidDef), (Definition/ValidDef2)', - 'invalid2': '(Event, (Definition/InvalidDef2))', - 'invalidTwoInOne': '(Definition/InvalidDef2, Definition/InvalidDef3)', - 'invalid2TwoInOne': '(Definition/InvalidDef2, Onset)', - 'valid2TwoInOne': '(Duration/5.0 s, Delay, (Event))', - 'invalid3InOne': '(Duration/5.0 s, Delay, Onset, (Event))', - 'invalidDuration': '(Duration/5.0 s, Onset, (Event))', - 'validDelay': '(Delay, Onset, (Event))', - 'invalidDurationPair': '(Duration/5.0 s, Duration/3.0 s, (Event))', - 'invalidDelayPair': '(Delay/3.0 s, Delay, (Event))', - } - expected_results = { - 'invalid1': False, - 'valid1': True, - 'valid2': True, - 'invalid2': False, - 'invalidTwoInOne': False, - 'invalid2TwoInOne': False, - 'valid2TwoInOne': True, - 'invalid3InOne': False, - 'invalidDuration': False, - 'validDelay': True, - 'invalidDurationPair': False, - 'invalidDelayPair': False, - } - expected_issues = { - 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) - + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), - 'valid1': [], - 'valid2': [], - 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) - + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), - 'invalidTwoInOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Definition/InvalidDef3".split(", ")), - 'invalid2TwoInOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Onset".split(", ")), - 'valid2TwoInOne': [], - 'invalid3InOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Delay, Onset".split(", ")), - 'invalidDuration': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Onset".split(", ")), - 'validDelay': [], - 'invalidDurationPair': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Duration/3.0 s".split(", ")), - 'invalidDelayPair': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Delay".split(", ")), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_taggroup_validation(self): - test_strings = { - 'invalid1': 'Def-Expand/InvalidDef', - 'invalid2': 'Def-Expand/InvalidDef, Event, (Event)', - 'invalid3': 'Event, (Event), Def-Expand/InvalidDef', - 'valid1': '(Def-Expand/ValidDef)', - 'valid2': '(Def-Expand/ValidDef), (Def-Expand/ValidDef2)', - 'valid3': '(Event, (Def-Expand/InvalidDef2))', - # This case should possibly be flagged as invalid - 'semivalid1': '(Def-Expand/InvalidDef2, Def-Expand/InvalidDef3)', - 'semivalid2': '(Def-Expand/InvalidDef2, Onset)', - } - expected_results = { - 'invalid1': False, - 'invalid2': False, - 'invalid3': False, - 'valid1': True, - 'valid2': True, - 'valid3': True, - 'semivalid1': True, - 'semivalid2': True, - } - expected_issues = { - 'invalid1': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, - tag=0), - 'invalid2': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, - tag=0), - 'invalid3': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, - tag=2), - 'valid1': [], - 'valid2': [], - 'valid3': [], - 'semivalid1': [], - 'semivalid2': [] - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_empty_groups(self): - test_strings = { - 'emptyGroup': 'Event, ()' - } - expected_results = { - 'emptyGroup': False - } - expected_issues = { - 'emptyGroup': self.format_error(ValidationErrors.HED_GROUP_EMPTY, tag=1000 + 1) - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class FullHedString(TestHed): - compute_forms = False - - @staticmethod - def string_obj_func(validator): - return validator._run_hed_string_validators - - def test_invalid_placeholders(self): - # We might want these to be banned later as invalid characters. - test_strings = { - 'invalidPlaceholder': 'Duration/# ms', - 'invalidMiscPoundSign': 'Du#ation/20 ms', - } - expected_results = { - 'invalidPlaceholder': True, - 'invalidMiscPoundSign': True, - } - expected_issues = { - 'invalidPlaceholder': [], - 'invalidMiscPoundSign': [], - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_mismatched_parentheses(self): - test_strings = { - 'extraOpening': - 'Action/Reach/To touch,((Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', - 'extraClosing': - 'Action/Reach/To touch,(Attribute/Object side/Left,Participant/Effect/Body part/Arm),),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', - 'valid': - 'Action/Reach/To touch,(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px' - } - expected_results = { - 'extraOpening': False, - 'extraClosing': False, - 'valid': True - } - expected_issues = { - 'extraOpening': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, - opening_parentheses_count=2, - closing_parentheses_count=1), - 'extraClosing': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, - opening_parentheses_count=1, - closing_parentheses_count=2) - + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['extraClosing'], - char_index=84), - 'valid': [] - } - - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_malformed_delimiters(self): - test_strings = { - 'missingOpeningComma': - 'Action/Reach/To touch(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', - 'missingClosingComma': - 'Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm)Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px', - 'extraOpeningComma': - ',Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', - 'extraClosingComma': - 'Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px,', - # 'extraOpeningParen': - # '(Action/Reach/To touch,' - # '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - # 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', - # 'extraClosingParen': - # 'Action/Reach/To touch,' - # '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - # 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px)', - 'multipleExtraOpeningDelimiters': - ',,,Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px', - 'multipleExtraClosingDelimiters': - 'Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' - 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px,,,,', - 'multipleExtraMiddleDelimiters': - 'Action/Reach/To touch,' - ',(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - ',,Attribute/Location/Screen/Left/23 px', - 'valid': - 'Action/Reach/To touch,' - '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px', - 'validNestedParentheses': - 'Action/Reach/To touch,' - '((Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px),Event/Duration/3 ms', - 'validNestedParentheses2': - 'Action/Reach/To touch,' - '(((Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' - 'Attribute/Location/Screen/Left/23 px)),Event/Duration/3 ms', - 'validNestedParentheses3': - 'Thing, (Thing, (Thing))', - 'validNestedParentheses4': 'Thing, ((Thing, (Thing)), Thing)', - 'invalidNestedParentheses': 'Thing, ((Thing, (Thing)) Thing)', - # 'emptyGroup': 'Thing, ()' - } - - expected_results = { - 'missingOpeningComma': False, - 'missingClosingComma': False, - 'extraOpeningComma': False, - 'extraClosingComma': False, - 'extraOpeningParen': False, - 'extraClosingParen': False, - 'multipleExtraOpeningDelimiters': False, - 'multipleExtraClosingDelimiters': False, - 'multipleExtraMiddleDelimiters': False, - 'valid': True, - 'validNestedParentheses': True, - 'validNestedParentheses2': True, - 'validNestedParentheses3': True, - 'validNestedParentheses4': True, - 'invalidNestedParentheses': False, - # 'emptyGroup': False - } - expected_issues = { - 'missingOpeningComma': self.format_error(ValidationErrors.COMMA_MISSING, - tag="Action/Reach/To touch("), - 'missingClosingComma': self.format_error(ValidationErrors.COMMA_MISSING, - tag="Participant/Effect/Body part/Arm)"), - 'extraOpeningComma': self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['extraOpeningComma'], - char_index=0), - 'extraClosingComma': self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['extraClosingComma'], - char_index=len( - test_strings['extraClosingComma']) - 1), - # 'extraOpeningParen': self.format_error(ValidationErrors.TAG_EMPTY, - # character='(', index_in_tag=0), - # 'extraClosingParen': self.format_error(ValidationErrors.TAG_EMPTY, character=')', - # index_in_tag=len(test_strings['extraClosingParen']) - 1), - 'extraOpeningParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, - opening_parentheses_count=2, - closing_parentheses_count=1), - 'extraClosingParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, - opening_parentheses_count=1, - closing_parentheses_count=2), - 'multipleExtraOpeningDelimiters': - self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=0) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=1) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=2), - 'multipleExtraClosingDelimiters': - self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraClosingDelimiters'], - char_index=len(test_strings['multipleExtraClosingDelimiters']) - 1) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraClosingDelimiters'], - char_index=len(test_strings['multipleExtraClosingDelimiters']) - 2) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraClosingDelimiters'], - char_index=len(test_strings['multipleExtraClosingDelimiters']) - 3) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraClosingDelimiters'], - char_index=len(test_strings['multipleExtraClosingDelimiters']) - 4), - 'multipleExtraMiddleDelimiters': - self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=22) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=121) - + self.format_error(ValidationErrors.TAG_EMPTY, - source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=122), - 'valid': [], - 'validNestedParentheses': [], - 'validNestedParentheses2': [], - 'validNestedParentheses3': [], - 'validNestedParentheses4': [], - 'invalidNestedParentheses': self.format_error(ValidationErrors.COMMA_MISSING, - tag="Thing)) "), - # 'emptyGroup': [] - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_invalid_characters(self): - test_strings = { - 'openingBrace': - 'Attribute/Object side/Left,Participant/Effect{/Body part/Arm', - 'closingBrace': - 'Attribute/Object side/Left,Participant/Effect}/Body part/Arm', - 'openingBracket': - 'Attribute/Object side/Left,Participant/Effect[/Body part/Arm', - 'closingBracket': - 'Attribute/Object side/Left,Participant/Effect]/Body part/Arm' - } - expected_results = { - 'openingBrace': False, - 'closingBrace': False, - 'openingBracket': False, - 'closingBracket': False - } - expected_issues = { - 'openingBrace': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, - source_string=test_strings['openingBrace']), - 'closingBrace': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, - source_string=test_strings['closingBrace']), - 'openingBracket': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, - source_string=test_strings['openingBracket']), - 'closingBracket': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, - source_string=test_strings['closingBracket']) - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_string_extra_slash_space(self): - test_strings = { - 'twoLevelDoubleSlash': 'Event//Extension', - 'threeLevelDoubleSlash': 'Vehicle//Boat//Tanker', - 'tripleSlashes': 'Vehicle///Boat///Tanker', - 'mixedSingleAndDoubleSlashes': 'Vehicle//Boat/Tanker', - 'singleSlashWithSpace': 'Event/ Extension', - 'doubleSlashSurroundingSpace': 'Event/ /Extension', - 'doubleSlashThenSpace': 'Event// Extension', - 'sosPattern': 'Event/// ///Extension', - 'alternatingSlashSpace': 'Vehicle/ / Boat/ / Tanker', - 'leadingDoubleSlash': '//Event/Extension', - 'trailingDoubleSlash': 'Event/Extension//', - 'leadingDoubleSlashWithSpace': '/ /Event/Extension', - 'trailingDoubleSlashWithSpace': 'Event/Extension/ /', - } - # expected_event_extension = 'Event/Extension' - # expected_tanker = 'Item/Object/Man-made/Vehicle/Boat/Tanker' - expected_results = { - 'twoLevelDoubleSlash': False, - 'threeLevelDoubleSlash': False, - 'tripleSlashes': False, - 'mixedSingleAndDoubleSlashes': False, - 'singleSlashWithSpace': False, - 'doubleSlashSurroundingSpace': False, - 'doubleSlashThenSpace': False, - 'sosPattern': False, - 'alternatingSlashSpace': False, - 'leadingDoubleSlash': False, - 'trailingDoubleSlash': False, - 'leadingDoubleSlashWithSpace': False, - 'trailingDoubleSlashWithSpace': False, - } - expected_errors = { - 'twoLevelDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=5, index_in_tag_end=7, tag=0), - 'threeLevelDoubleSlash': - self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=7, index_in_tag_end=9, tag=0) - + self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=13, index_in_tag_end=15, tag=0), - 'tripleSlashes': - self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=10, tag=0) - + self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=14, index_in_tag_end=17, tag=0), - 'mixedSingleAndDoubleSlashes': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=7, index_in_tag_end=9, tag=0), - 'singleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=5, index_in_tag_end=7, tag=0), - 'doubleSlashSurroundingSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=5, index_in_tag_end=8, tag=0), - 'doubleSlashThenSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=5, index_in_tag_end=8, tag=0), - 'sosPattern': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, - index_in_tag_end=14, tag=0), - 'alternatingSlashSpace': - self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=11, tag=0) - + self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=15, index_in_tag_end=19, tag=0), - 'leadingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=0, - index_in_tag_end=2, tag=0), - 'trailingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=15, - index_in_tag_end=17, tag=0), - 'leadingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=0, index_in_tag_end=3, tag=0), - 'trailingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, - index_in_tag=15, index_in_tag_end=18, - tag=0), - } - self.validator_semantic(test_strings, expected_results, expected_errors, False) - - def test_no_more_than_two_tildes(self): - test_strings = { - 'noTildeGroup': 'Event/Category/Initial context,' - '(Item/Object/Vehicle/Train,Event/Category/Initial context)', - 'oneTildeGroup': 'Event/Category/Initial context,' - '(Item/Object/Vehicle/Car ~ Attribute/Object control/Perturb)', - 'twoTildeGroup': 'Event/Category/Initial context,' - '(Participant/ID 1 ~ Participant/Effect/Visual ~ Item/Object/Vehicle/Car, Item/ID/RedCar,' - ' Attribute/Visual/Color/Red)', - 'invalidTildeGroup': 'Event/Category/Initial context,' - '(Participant/ID 1 ~ Participant/Effect/Visual ~ Item/Object/Vehicle/Car,' - ' Item/ID/RedCar, Attribute/Visual/Color/Red ~ Attribute/Object control/Perturb)', - } - expected_results = { - 'noTildeGroup': True, - 'oneTildeGroup': False, - 'twoTildeGroup': False, - 'invalidTildeGroup': False - } - expected_issues = { - 'noTildeGroup': [], - 'oneTildeGroup': self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['oneTildeGroup'], - char_index=56), - 'twoTildeGroup': - self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['twoTildeGroup'], char_index=49) - + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['twoTildeGroup'], char_index=77), - 'invalidTildeGroup': - self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['invalidTildeGroup'], char_index=49) - + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['invalidTildeGroup'], char_index=77) - + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, - source_string=test_strings['invalidTildeGroup'], char_index=147) - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class RequiredTags(TestHed): - schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' - - @staticmethod - def string_obj_func(validator): - return partial(validator._group_validator.run_all_tags_validators) - - def test_includes_all_required_tags(self): - test_strings = { - 'complete': 'Animal-agent, Action', - 'missingAgent': 'Action', - 'missingAction': 'Animal-agent', - 'inSubGroup': 'Animal-agent, (Action)', - 'missingAll': 'Event' - } - expected_results = { - 'complete': True, - 'missingAgent': False, - 'missingAction': False, - 'inSubGroup': True, - 'missingAll': False, - } - expected_issues = { - 'complete': [], - 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, - tag_namespace='Agent/Animal-agent'), - 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action'), - 'inSubGroup': [], - 'missingAll': - self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action') - + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Agent/Animal-agent'), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_multiple_copies_unique_tags(self): - test_strings = { - 'legal': 'Event-context,' - '(Vehicle,Event), Animal-agent, Action', - 'multipleDesc': 'Event-context,' - 'Event-context,' - 'Vehicle,(Vehicle,Event-context), Animal-agent, Action', - # I think this is illegal in hed2 style schema now. - 'multipleDescIncShort': 'Event-context,' - 'Organizational-property/Event-context, Animal-agent, Action' - } - expected_results = { - 'legal': True, - 'multipleDesc': False, - 'multipleDescIncShort': False - } - expected_issues = { - 'legal': [], - 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, - tag_namespace='Property/Organizational-property/Event-context'), - 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, - tag_namespace='Property/Organizational-property/Event-context'), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class RequiredTagInDefinition(TestHed): - schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' - - @staticmethod - def string_obj_func(validator): - from hed.validator import DefValidator - def_dict = DefValidator() - return partial(def_dict.check_for_definitions) - - def test_includes_all_required_tags(self): - test_strings = { - 'complete': 'Animal-agent, Action, (Definition/labelWithRequired, (Action))', - } - expected_results = { - 'complete': False, - } - expected_issues = { - 'complete': self.format_error(DefinitionErrors.BAD_PROP_IN_DEFINITION, tag=3, def_name='labelWithRequired'), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - -class TestHedSpecialUnits(TestHed): - compute_forms = True - schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' - - @staticmethod - def string_obj_func(validator): - return partial(validator._validate_individual_tags_in_hed_string) - - def test_special_units(self): - test_strings = { - 'specialAllowedCharCurrency': 'Item/Currency-test/$ 100', - 'specialNotAllowedCharCurrency': 'Item/Currency-test/@ 100', - 'specialAllowedCharCurrencyAsSuffix': 'Item/Currency-test/100 $', - # Update tests - 8.0 currently has no clockTime nodes. - # 'properTime': 'Item/clockTime-test/08:30', - # 'invalidTime': 'Item/clockTime-test/54:54' - } - expected_results = { - # 'properTime': True, - # 'invalidTime': True, - 'specialAllowedCharCurrency': True, - 'specialNotAllowedCharCurrency': False, - 'specialAllowedCharCurrencyAsSuffix': False, - } - legal_currency_units = ['dollar', "$", "point"] - - expected_issues = { - # 'properTime': [], - # 'invalidTime': [], - 'specialAllowedCharCurrency': [], - 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, - units=legal_currency_units) - + self.format_error(ValidationErrors.VALUE_INVALID, - tag=0), - 'specialAllowedCharCurrencyAsSuffix': self.format_error(ValidationErrors.UNITS_INVALID, - tag=0, - units=legal_currency_units), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - -class TestHedAllowedCharacters(TestHed): - compute_forms = True - schema_file = '../data/schema_tests/schema_utf8.mediawiki' - - @staticmethod - def string_obj_func(validator): - return partial(validator._validate_individual_tags_in_hed_string) - - def test_special_units(self): - test_strings = { - 'ascii': 'Ascii/bad-date', - 'illegalTab': 'Ascii/bad-dat\t', - 'allowTab': 'Nonascii/Cafe\t', - } - expected_results = { - 'ascii': True, - 'illegalTab': False, - 'allowTab': True - } - - expected_issues = { - 'ascii': [], - 'illegalTab': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, tag=0, - index_in_tag=13, index_in_tag_end=14), - 'allowTab': [] - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - -if __name__ == '__main__': - unittest.main() +import unittest + +from hed.errors.error_types import ValidationErrors, DefinitionErrors, TemporalErrors +from tests.validator.test_tag_validator_base import TestValidatorBase +from hed.schema.hed_schema_io import load_schema_version +from functools import partial + + +#todo: update these tests(TagValidator no longer exists) +class TestHed(TestValidatorBase): + schema_file = "../data/schema_tests/HED8.2.0.mediawiki" + + +class IndividualHedTagsShort(TestHed): + hed_schema = load_schema_version("score_1.1.0") + @staticmethod + def string_obj_func(validator): + return partial(validator._validate_individual_tags_in_hed_string) + + def test_exist_in_schema(self): + test_strings = { + 'takesValue': 'Duration/3 ms', + 'full': 'Animal-agent', + 'extensionsAllowed': 'Item/Beaver', + 'leafExtension': 'Experiment-procedure/Something', + 'nonExtensionsAllowed': 'Event/Nonsense', + 'invalidExtension': 'Agent/Red', + 'invalidExtension2': 'Agent/Red/Extension2', + 'usedToBeIllegalComma': 'Label/This is a label,This/Is/A/Tag', + 'legalDef': 'Def/Item', + 'legalDefExpand': 'Def-expand/Item', + 'illegalDefinition': 'Definition/Item', + } + expected_results = { + 'takesValue': True, + 'full': True, + 'extensionsAllowed': True, + 'leafExtension': False, + 'nonExtensionsAllowed': False, + 'invalidExtension': False, + 'invalidExtension2': False, + 'usedToBeIllegalComma': False, + 'legalDef': True, + 'legalDefExpand': True, + 'illegalDefinition': False, + } + expected_issues = { + 'takesValue': [], + 'full': [], + 'extensionsAllowed': [], + 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'invalidExtension': self.format_error( + ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=6, index_in_tag_end=9, + expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + + "/Color/CSS-color/Red-color/Red"), + 'invalidExtension2': self.format_error( + ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=6, index_in_tag_end=9, + expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + + "/Color/CSS-color/Red-color/Red"), + 'usedToBeIllegalComma': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, tag=1, + index_in_tag=0, index_in_tag_end=4), + 'legalDef': [], + 'legalDefExpand': [], + 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0) + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_proper_capitalization(self): + test_strings = { + 'proper': 'Event/Sensory-event', + 'camelCase': 'EvEnt/Sensory-event', + 'takesValue': 'Sampling-rate/20 Hz', + 'numeric': 'Statistical-uncertainty/20', + 'lowercase': 'Event/sensory-event' + } + expected_results = { + 'proper': True, + 'camelCase': True, + 'takesValue': True, + 'numeric': True, + 'lowercase': False + } + expected_issues = { + 'proper': [], + 'camelCase': [], + 'takesValue': [], + 'numeric': [], + 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + # def test_proper_capitalization(self): + # test_strings = { + # 'proper': 'Event/Sensory-event', + # 'camelCase': 'EvEnt/Something', + # 'takesValue': 'Sampling-rate/20 Hz', + # 'numeric': 'Statistical-uncertainty/20', + # 'lowercase': 'Event/something', + # 'multipleUpper': 'Event/SomeThing' + # } + # expected_results = { + # 'proper': True, + # 'camelCase': False, + # 'takesValue': True, + # 'numeric': True, + # 'lowercase': False, + # 'multipleUpper': False + # } + # expected_issues = { + # 'proper': [], + # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'takesValue': [], + # 'numeric': [], + # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) + # } + # self.validator_semantic(test_strings, expected_results, expected_issues, True) + # + # def test_proper_capitalization_semantic(self): + # test_strings = { + # 'proper': 'Event/Sensory-event', + # 'camelCase': 'EvEnt/Sensory-event', + # 'takesValue': 'Sampling-rate/20 Hz', + # 'numeric': 'Statistical-uncertainty/20', + # 'lowercase': 'Event/sensory-event', + # 'multipleUpper': 'Event/Sensory-Event' + # } + # expected_results = { + # 'proper': True, + # 'camelCase': False, + # 'takesValue': True, + # 'numeric': True, + # 'lowercase': False, + # 'multipleUpper': False + # } + # expected_issues = { + # 'proper': [], + # 'camelCase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'takesValue': [], + # 'numeric': [], + # 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0), + # 'multipleUpper': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) + # } + # self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_child_required(self): + test_strings = { + 'hasChild': 'Experimental-stimulus', + 'missingChild': 'Label' + } + expected_results = { + 'hasChild': True, + 'missingChild': False + } + expected_issues = { + 'hasChild': [], + 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_required_units(self): + test_strings = { + 'hasRequiredUnit': 'Duration/3 ms', + 'missingRequiredUnit': 'Duration/3', + 'notRequiredNoNumber': 'Age', + 'notRequiredNumber': 'Age/0.5', + 'notRequiredScientific': 'Age/5.2e-1', + 'timeValue': 'Clock-face/08:30', + # Update test - This one is currently marked as valid because clock face isn't in hed3 + 'invalidTimeValue': 'Clock-face/8:30', + } + expected_results = { + 'hasRequiredUnit': True, + 'missingRequiredUnit': False, + 'notRequiredNoNumber': True, + 'notRequiredNumber': True, + 'notRequiredScientific': True, + 'timeValue': False, + 'invalidTimeValue': False, + } + # legal_clock_time_units = ['hour:min', 'hour:min:sec'] + expected_issues = { + 'hasRequiredUnit': [], + 'missingRequiredUnit': self.format_error(ValidationErrors.UNITS_MISSING, tag=0, + default_unit='s'), + 'notRequiredNoNumber': [], + 'notRequiredNumber': [], + 'notRequiredScientific': [], + 'timeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, + index_in_tag=10, index_in_tag_end=None), + 'invalidTimeValue': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, + index_in_tag=10, index_in_tag_end=None), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_correct_units(self): + test_strings = { + # 'correctUnit': 'Duration/3 ms', + # 'correctUnitScientific': 'Duration/3.5e1 ms', + # 'correctPluralUnit': 'Duration/3 milliseconds', + # 'correctNoPluralUnit': 'Frequency/3 hertz', + # 'correctNonSymbolCapitalizedUnit': 'Duration/3 MilliSeconds', + # 'correctSymbolCapitalizedUnit': 'Frequency/3 kHz', + + 'incorrectUnit': 'Duration/3 cm', + 'incorrectSiUsage': 'Duration/3 decaday', + 'incorrectPluralUnit': 'Frequency/3 hertzs', + 'incorrectSymbolCapitalizedUnit': 'Frequency/3 hz', + 'incorrectSymbolCapitalizedUnitModifier': 'Frequency/3 KHz', + 'notRequiredNumber': 'Statistical-accuracy/0.5', + 'notRequiredScientific': 'Statistical-accuracy/5e-1', + 'specialAllowedCharBadUnit': 'Creation-date/ba', + 'specialAllowedCharUnit': 'Creation-date/1900-01-01T01:01:01', + # todo: restore these when we have a currency node in the valid beta schema. + # 'specialAllowedCharCurrency': 'Event/Currency-Test/$100', + # 'specialNotAllowedCharCurrency': 'Event/Currency-Test/@100' + # Update tests - 8.0 currently has no clockTime nodes. + # 'properTime': 'Item/2D shape/Clock face/08:30', + # 'invalidTime': 'Item/2D shape/Clock face/54:54' + 'voltsTest1': 'Finding-amplitude/30 v', + 'voltsTest2': 'Finding-amplitude/30 Volt', + 'voltsTest3': 'Finding-amplitude/30 volts', + 'voltsTest4': 'Finding-amplitude/30 VOLTS', + 'voltsTest5': 'Finding-amplitude/30 kv', + 'voltsTest6': 'Finding-amplitude/30 kiloVolt', + 'voltsTest7': 'Finding-amplitude/30 KiloVolt', + 'volumeTest1': "Sound-volume/5 dB", + 'volumeTest2': "Sound-volume/5 kdB", # Invalid, not SI unit + 'volumeTest3': "Sound-volume/5 candela", + 'volumeTest4': "Sound-volume/5 kilocandela", + 'volumeTest5': "Sound-volume/5 cd", + 'volumeTest6': "Sound-volume/5 kcd", + 'volumeTest7': "Sound-volume/5 DB", # Invalid, case doesn't match + } + expected_results = { + 'correctUnit': True, + 'correctUnitScientific': True, + 'correctPluralUnit': True, + 'correctNoPluralUnit': True, + 'correctNonSymbolCapitalizedUnit': True, + 'correctSymbolCapitalizedUnit': True, + 'incorrectUnit': False, + 'incorrectSiUsage': False, + 'incorrectPluralUnit': False, + 'incorrectSymbolCapitalizedUnit': False, + 'incorrectSymbolCapitalizedUnitModifier': False, + 'notRequiredNumber': True, + 'notRequiredScientific': True, + 'specialAllowedCharBadUnit': False, + 'specialAllowedCharUnit': True, + # 'properTime': True, + # 'invalidTime': True, + # 'specialAllowedCharCurrency': True, + # 'specialNotAllowedCharCurrency': False, + 'voltsTest1': True, + 'voltsTest2': True, + 'voltsTest3': True, + 'voltsTest4': True, + 'voltsTest5': True, + 'voltsTest6': True, + 'voltsTest7': True, + 'volumeTest1': True, + 'volumeTest2': False, + 'volumeTest3': True, + 'volumeTest4': True, + 'volumeTest5': True, + 'volumeTest6': True, + 'volumeTest7': False, + } + legal_time_units = ['s', 'second', 'day', 'minute', 'hour'] + # legal_clock_time_units = ['hour:min', 'hour:min:sec'] + # legal_datetime_units = ['YYYY-MM-DDThh:mm:ss'] + legal_freq_units = ['Hz', 'hertz'] + # legal_currency_units = ['dollar', "$", "point"] + legal_intensity_units = ["candela", "cd", "dB"] + + expected_issues = { + 'correctUnit': [], + 'correctUnitScientific': [], + 'correctPluralUnit': [], + 'correctNoPluralUnit': [], + 'correctNonSymbolCapitalizedUnit': [], + 'correctSymbolCapitalizedUnit': [], + 'incorrectUnit': self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, units=legal_time_units), + 'incorrectSiUsage': self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, units=legal_time_units), + 'incorrectPluralUnit': self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, units=legal_freq_units), + 'incorrectSymbolCapitalizedUnit': self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, + units=legal_freq_units), + 'incorrectSymbolCapitalizedUnitModifier': self.format_error( + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), + 'notRequiredNumber': [], + 'notRequiredScientific': [], + 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, tag=0, + index_in_tag=0, index_in_tag_end=16, + value_class="dateTimeClass", + actual_error=ValidationErrors.VALUE_INVALID), + 'specialAllowedCharUnit': [], + # 'properTime': [], + # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, + # units=legal_clock_time_units) + # 'specialAllowedCharCurrency': [], + # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, + # tag=0, + # units=legal_currency_units), + 'voltsTest1': [], + 'voltsTest2': [], + 'voltsTest3': [], + 'voltsTest4': [], + 'voltsTest5': [], + 'voltsTest6': [], + 'voltsTest7': [], + 'volumeTest1': [], + 'volumeTest2': self.format_error(ValidationErrors.UNITS_INVALID,tag=0, units=legal_intensity_units), + 'volumeTest3': [], + 'volumeTest4': [], + 'volumeTest5': [], + 'volumeTest6': [], + 'volumeTest7': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, units=legal_intensity_units), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_extensions(self): + test_strings = { + 'invalidExtension': 'Experiment-control/Animal-agent', + } + expected_results = { + 'invalidExtension': False, + } + expected_issues = { + 'invalidExtension': self.format_error(ValidationErrors.INVALID_PARENT_NODE, tag=0, + index_in_tag=19, index_in_tag_end=31, + expected_parent_tag="Agent/Animal-agent"), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_extension_warning(self): + test_strings = { + 'noWarning': "Condition-variable/ValidExt", + 'warning': "Task-property/WarningExt" + } + expected_results = { + 'noWarning': True, + 'warning': False, + } + expected_issues = { + 'noWarning': [], + 'warning': self.format_error(ValidationErrors.TAG_EXTENDED, tag=0, + index_in_tag=13, index_in_tag_end=None), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_invalid_placeholder_in_normal_string(self): + test_strings = { + 'invalidPlaceholder': 'Duration/# ms', + 'invalidMiscPoundSign': 'Du#ation/20 ms', + 'invalidAfterBaseTag': 'Action/Invalid#/InvalidExtension' + } + expected_results = { + 'invalidPlaceholder': False, + 'invalidMiscPoundSign': False, + 'invalidAfterBaseTag': False, + } + expected_issues = { + 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, + tag=0, index_in_tag=9, index_in_tag_end=10, + actual_error=ValidationErrors.PLACEHOLDER_INVALID) + + self.format_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, tag=0, index_in_tag=0, + index_in_tag_end=13, value_class="numericClass", + actual_error=ValidationErrors.VALUE_INVALID) + , + 'invalidMiscPoundSign': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, + tag=0, index_in_tag=0, index_in_tag_end=8), + 'invalidAfterBaseTag': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, + tag=0, index_in_tag=14, index_in_tag_end=15, + actual_error=ValidationErrors.PLACEHOLDER_INVALID), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_span_reporting(self): + test_strings = { + 'orgTagDifferent': 'Duration/23 hz', + 'orgTagDifferent2': 'Duration/23 hz, Duration/23 hz', + } + expected_results = { + 'orgTagDifferent': False, + 'orgTagDifferent2': False, + } + tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] + expected_issues = { + 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, units=tag_unit_class_units), + 'orgTagDifferent2': + self.format_error(ValidationErrors.UNITS_INVALID, + tag=0, units=tag_unit_class_units) + + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, + units=tag_unit_class_units), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class TestTagLevels(TestHed): + @staticmethod + def string_obj_func(validator): + return validator._group_validator.run_tag_level_validators + + def test_no_duplicates(self): + test_strings = { + 'topLevelDuplicate': 'Event/Sensory-event,Event/Sensory-event', + 'groupDuplicate': 'Item/Object/Man-made-object/VehicleTrain,(Event/Sensory-event,' + 'Purple-color/Purple,Event/Sensory-event)', + 'noDuplicate': 'Event/Sensory-event,' + 'Item/Object/Man-made-object/VehicleTrain,' + 'Purple-color/Purple', + 'legalDuplicate': 'Item/Object/Man-made-object/VehicleTrain,(Item/Object/Man-made-object/VehicleTrain,' + 'Event/Sensory-event)', + 'duplicateGroup': 'Sensory-event, (Sensory-event, Man-made-object/VehicleTrain),' + '(Man-made-object/VehicleTrain, Sensory-event)', + 'duplicateSubGroup': 'Sensory-event, (Event, (Sensory-event, Man-made-object/VehicleTrain)),' + '(Event, (Man-made-object/VehicleTrain, Sensory-event))', + 'duplicateSubGroupF': 'Sensory-event, ((Sensory-event, Man-made-object/VehicleTrain), Event),' + '((Man-made-object/VehicleTrain, Sensory-event), Event)' + } + expected_results = { + 'topLevelDuplicate': False, + 'groupDuplicate': False, + 'legalDuplicate': True, + 'noDuplicate': True, + 'duplicateGroup': False, + 'duplicateSubGroup': False, + 'duplicateSubGroupF': False, + } + from hed import HedString + expected_issues = { + 'topLevelDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), + 'groupDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=3), + 'legalDuplicate': [], + 'noDuplicate': [], + 'duplicateGroup': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, + group=HedString("(Sensory-event, Man-made-object/VehicleTrain)", self.hed_schema)), + 'duplicateSubGroup': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, + group=HedString("(Event,(Sensory-event,Man-made-object/VehicleTrain))", self.hed_schema)), + 'duplicateSubGroupF': self.format_error(ValidationErrors.HED_TAG_REPEATED_GROUP, + group=HedString("((Sensory-event,Man-made-object/VehicleTrain),Event)", self.hed_schema)), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_no_duplicates_semantic(self): + test_strings = { + 'mixedLevelDuplicates': 'Man-made-object/Vehicle/Boat, Vehicle/Boat', + 'mixedLevelDuplicates2': 'Man-made-object/Vehicle/Boat, Boat' + } + expected_results = { + 'mixedLevelDuplicates': False, + 'mixedLevelDuplicates2': False, + } + expected_issues = { + 'mixedLevelDuplicates': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), + 'mixedLevelDuplicates2': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_topLevelTagGroup_validation(self): + test_strings = { + 'invalid1': 'Definition/InvalidDef', + 'valid1': '(Definition/ValidDef)', + 'valid2': '(Definition/ValidDef), (Definition/ValidDef2)', + 'invalid2': '(Event, (Definition/InvalidDef2))', + 'invalidTwoInOne': '(Definition/InvalidDef2, Definition/InvalidDef3)', + 'invalid2TwoInOne': '(Definition/InvalidDef2, Onset)', + 'valid2TwoInOne': '(Duration/5.0 s, Delay, (Event))', + 'invalid3InOne': '(Duration/5.0 s, Delay, Onset, (Event))', + 'invalidDuration': '(Duration/5.0 s, Onset, (Event))', + 'validDelay': '(Delay, Onset, (Event))', + 'invalidDurationPair': '(Duration/5.0 s, Duration/3.0 s, (Event))', + 'invalidDelayPair': '(Delay/3.0 s, Delay, (Event))', + } + expected_results = { + 'invalid1': False, + 'valid1': True, + 'valid2': True, + 'invalid2': False, + 'invalidTwoInOne': False, + 'invalid2TwoInOne': False, + 'valid2TwoInOne': True, + 'invalid3InOne': False, + 'invalidDuration': False, + 'validDelay': True, + 'invalidDurationPair': False, + 'invalidDelayPair': False, + } + expected_issues = { + 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), + 'valid1': [], + 'valid2': [], + 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), + 'invalidTwoInOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Definition/InvalidDef3".split(", ")), + 'invalid2TwoInOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Onset".split(", ")), + 'valid2TwoInOne': [], + 'invalid3InOne': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Delay, Onset".split(", ")), + 'invalidDuration': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Onset".split(", ")), + 'validDelay': [], + 'invalidDurationPair': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Duration/3.0 s".split(", ")), + 'invalidDelayPair': self.format_error(ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, multiple_tags="Delay".split(", ")), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_taggroup_validation(self): + test_strings = { + 'invalid1': 'Def-Expand/InvalidDef', + 'invalid2': 'Def-Expand/InvalidDef, Event, (Event)', + 'invalid3': 'Event, (Event), Def-Expand/InvalidDef', + 'valid1': '(Def-Expand/ValidDef)', + 'valid2': '(Def-Expand/ValidDef), (Def-Expand/ValidDef2)', + 'valid3': '(Event, (Def-Expand/InvalidDef2))', + # This case should possibly be flagged as invalid + 'semivalid1': '(Def-Expand/InvalidDef2, Def-Expand/InvalidDef3)', + 'semivalid2': '(Def-Expand/InvalidDef2, Onset)', + } + expected_results = { + 'invalid1': False, + 'invalid2': False, + 'invalid3': False, + 'valid1': True, + 'valid2': True, + 'valid3': True, + 'semivalid1': True, + 'semivalid2': True, + } + expected_issues = { + 'invalid1': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, + tag=0), + 'invalid2': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, + tag=0), + 'invalid3': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, + tag=2), + 'valid1': [], + 'valid2': [], + 'valid3': [], + 'semivalid1': [], + 'semivalid2': [] + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_empty_groups(self): + test_strings = { + 'emptyGroup': 'Event, ()' + } + expected_results = { + 'emptyGroup': False + } + expected_issues = { + 'emptyGroup': self.format_error(ValidationErrors.HED_GROUP_EMPTY, tag=1000 + 1) + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class FullHedString(TestHed): + compute_forms = False + + @staticmethod + def string_obj_func(validator): + return validator._run_hed_string_validators + + def test_invalid_placeholders(self): + # We might want these to be banned later as invalid characters. + test_strings = { + 'invalidPlaceholder': 'Duration/# ms', + 'invalidMiscPoundSign': 'Du#ation/20 ms', + } + expected_results = { + 'invalidPlaceholder': True, + 'invalidMiscPoundSign': True, + } + expected_issues = { + 'invalidPlaceholder': [], + 'invalidMiscPoundSign': [], + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_mismatched_parentheses(self): + test_strings = { + 'extraOpening': + 'Action/Reach/To touch,((Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', + 'extraClosing': + 'Action/Reach/To touch,(Attribute/Object side/Left,Participant/Effect/Body part/Arm),),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', + 'valid': + 'Action/Reach/To touch,(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px' + } + expected_results = { + 'extraOpening': False, + 'extraClosing': False, + 'valid': True + } + expected_issues = { + 'extraOpening': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, + opening_parentheses_count=2, + closing_parentheses_count=1), + 'extraClosing': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, + opening_parentheses_count=1, + closing_parentheses_count=2) + + self.format_error(ValidationErrors.TAG_EMPTY, source_string=test_strings['extraClosing'], + char_index=84), + 'valid': [] + } + + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_malformed_delimiters(self): + test_strings = { + 'missingOpeningComma': + 'Action/Reach/To touch(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', + 'missingClosingComma': + 'Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm)Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px', + 'extraOpeningComma': + ',Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', + 'extraClosingComma': + 'Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px,', + # 'extraOpeningParen': + # '(Action/Reach/To touch,' + # '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + # 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px', + # 'extraClosingParen': + # 'Action/Reach/To touch,' + # '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + # 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px)', + 'multipleExtraOpeningDelimiters': + ',,,Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px', + 'multipleExtraClosingDelimiters': + 'Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),' + 'Attribute/Location/Screen/Top/70 px,Attribute/Location/Screen/Left/23 px,,,,', + 'multipleExtraMiddleDelimiters': + 'Action/Reach/To touch,' + ',(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + ',,Attribute/Location/Screen/Left/23 px', + 'valid': + 'Action/Reach/To touch,' + '(Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px', + 'validNestedParentheses': + 'Action/Reach/To touch,' + '((Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px),Event/Duration/3 ms', + 'validNestedParentheses2': + 'Action/Reach/To touch,' + '(((Attribute/Object side/Left,Participant/Effect/Body part/Arm),Attribute/Location/Screen/Top/70 px,' + 'Attribute/Location/Screen/Left/23 px)),Event/Duration/3 ms', + 'validNestedParentheses3': + 'Thing, (Thing, (Thing))', + 'validNestedParentheses4': 'Thing, ((Thing, (Thing)), Thing)', + 'invalidNestedParentheses': 'Thing, ((Thing, (Thing)) Thing)', + # 'emptyGroup': 'Thing, ()' + } + + expected_results = { + 'missingOpeningComma': False, + 'missingClosingComma': False, + 'extraOpeningComma': False, + 'extraClosingComma': False, + 'extraOpeningParen': False, + 'extraClosingParen': False, + 'multipleExtraOpeningDelimiters': False, + 'multipleExtraClosingDelimiters': False, + 'multipleExtraMiddleDelimiters': False, + 'valid': True, + 'validNestedParentheses': True, + 'validNestedParentheses2': True, + 'validNestedParentheses3': True, + 'validNestedParentheses4': True, + 'invalidNestedParentheses': False, + # 'emptyGroup': False + } + expected_issues = { + 'missingOpeningComma': self.format_error(ValidationErrors.COMMA_MISSING, + tag="Action/Reach/To touch("), + 'missingClosingComma': self.format_error(ValidationErrors.COMMA_MISSING, + tag="Participant/Effect/Body part/Arm)"), + 'extraOpeningComma': self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['extraOpeningComma'], + char_index=0), + 'extraClosingComma': self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['extraClosingComma'], + char_index=len( + test_strings['extraClosingComma']) - 1), + # 'extraOpeningParen': self.format_error(ValidationErrors.TAG_EMPTY, + # character='(', index_in_tag=0), + # 'extraClosingParen': self.format_error(ValidationErrors.TAG_EMPTY, character=')', + # index_in_tag=len(test_strings['extraClosingParen']) - 1), + 'extraOpeningParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, + opening_parentheses_count=2, + closing_parentheses_count=1), + 'extraClosingParen': self.format_error(ValidationErrors.PARENTHESES_MISMATCH, + opening_parentheses_count=1, + closing_parentheses_count=2), + 'multipleExtraOpeningDelimiters': + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=0) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=1) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraOpeningDelimiters'], char_index=2), + 'multipleExtraClosingDelimiters': + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraClosingDelimiters'], + char_index=len(test_strings['multipleExtraClosingDelimiters']) - 1) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraClosingDelimiters'], + char_index=len(test_strings['multipleExtraClosingDelimiters']) - 2) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraClosingDelimiters'], + char_index=len(test_strings['multipleExtraClosingDelimiters']) - 3) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraClosingDelimiters'], + char_index=len(test_strings['multipleExtraClosingDelimiters']) - 4), + 'multipleExtraMiddleDelimiters': + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=22) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=121) + + self.format_error(ValidationErrors.TAG_EMPTY, + source_string=test_strings['multipleExtraMiddleDelimiters'], char_index=122), + 'valid': [], + 'validNestedParentheses': [], + 'validNestedParentheses2': [], + 'validNestedParentheses3': [], + 'validNestedParentheses4': [], + 'invalidNestedParentheses': self.format_error(ValidationErrors.COMMA_MISSING, + tag="Thing)) "), + # 'emptyGroup': [] + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_invalid_characters(self): + test_strings = { + 'openingBrace': + 'Attribute/Object side/Left,Participant/Effect{/Body part/Arm', + 'closingBrace': + 'Attribute/Object side/Left,Participant/Effect}/Body part/Arm', + 'openingBracket': + 'Attribute/Object side/Left,Participant/Effect[/Body part/Arm', + 'closingBracket': + 'Attribute/Object side/Left,Participant/Effect]/Body part/Arm' + } + expected_results = { + 'openingBrace': False, + 'closingBrace': False, + 'openingBracket': False, + 'closingBracket': False + } + expected_issues = { + 'openingBrace': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, + source_string=test_strings['openingBrace']), + 'closingBrace': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, + source_string=test_strings['closingBrace']), + 'openingBracket': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, + source_string=test_strings['openingBracket']), + 'closingBracket': self.format_error(ValidationErrors.CHARACTER_INVALID, char_index=45, + source_string=test_strings['closingBracket']) + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_string_extra_slash_space(self): + test_strings = { + 'twoLevelDoubleSlash': 'Event//Extension', + 'threeLevelDoubleSlash': 'Vehicle//Boat//Tanker', + 'tripleSlashes': 'Vehicle///Boat///Tanker', + 'mixedSingleAndDoubleSlashes': 'Vehicle//Boat/Tanker', + 'singleSlashWithSpace': 'Event/ Extension', + 'doubleSlashSurroundingSpace': 'Event/ /Extension', + 'doubleSlashThenSpace': 'Event// Extension', + 'sosPattern': 'Event/// ///Extension', + 'alternatingSlashSpace': 'Vehicle/ / Boat/ / Tanker', + 'leadingDoubleSlash': '//Event/Extension', + 'trailingDoubleSlash': 'Event/Extension//', + 'leadingDoubleSlashWithSpace': '/ /Event/Extension', + 'trailingDoubleSlashWithSpace': 'Event/Extension/ /', + } + # expected_event_extension = 'Event/Extension' + # expected_tanker = 'Item/Object/Man-made/Vehicle/Boat/Tanker' + expected_results = { + 'twoLevelDoubleSlash': False, + 'threeLevelDoubleSlash': False, + 'tripleSlashes': False, + 'mixedSingleAndDoubleSlashes': False, + 'singleSlashWithSpace': False, + 'doubleSlashSurroundingSpace': False, + 'doubleSlashThenSpace': False, + 'sosPattern': False, + 'alternatingSlashSpace': False, + 'leadingDoubleSlash': False, + 'trailingDoubleSlash': False, + 'leadingDoubleSlashWithSpace': False, + 'trailingDoubleSlashWithSpace': False, + } + expected_errors = { + 'twoLevelDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=5, index_in_tag_end=7, tag=0), + 'threeLevelDoubleSlash': + self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=7, index_in_tag_end=9, tag=0) + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=13, index_in_tag_end=15, tag=0), + 'tripleSlashes': + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=10, tag=0) + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=14, index_in_tag_end=17, tag=0), + 'mixedSingleAndDoubleSlashes': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=7, index_in_tag_end=9, tag=0), + 'singleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=5, index_in_tag_end=7, tag=0), + 'doubleSlashSurroundingSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=5, index_in_tag_end=8, tag=0), + 'doubleSlashThenSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=5, index_in_tag_end=8, tag=0), + 'sosPattern': self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=5, + index_in_tag_end=14, tag=0), + 'alternatingSlashSpace': + self.format_error(ValidationErrors.NODE_NAME_EMPTY, index_in_tag=7, index_in_tag_end=11, tag=0) + + self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=15, index_in_tag_end=19, tag=0), + 'leadingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=0, + index_in_tag_end=2, tag=0), + 'trailingDoubleSlash': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=15, + index_in_tag_end=17, tag=0), + 'leadingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=0, index_in_tag_end=3, tag=0), + 'trailingDoubleSlashWithSpace': self.format_error(ValidationErrors.NODE_NAME_EMPTY, + index_in_tag=15, index_in_tag_end=18, + tag=0), + } + self.validator_semantic(test_strings, expected_results, expected_errors, False) + + def test_no_more_than_two_tildes(self): + test_strings = { + 'noTildeGroup': 'Event/Category/Initial context,' + '(Item/Object/Vehicle/Train,Event/Category/Initial context)', + 'oneTildeGroup': 'Event/Category/Initial context,' + '(Item/Object/Vehicle/Car ~ Attribute/Object control/Perturb)', + 'twoTildeGroup': 'Event/Category/Initial context,' + '(Participant/ID 1 ~ Participant/Effect/Visual ~ Item/Object/Vehicle/Car, Item/ID/RedCar,' + ' Attribute/Visual/Color/Red)', + 'invalidTildeGroup': 'Event/Category/Initial context,' + '(Participant/ID 1 ~ Participant/Effect/Visual ~ Item/Object/Vehicle/Car,' + ' Item/ID/RedCar, Attribute/Visual/Color/Red ~ Attribute/Object control/Perturb)', + } + expected_results = { + 'noTildeGroup': True, + 'oneTildeGroup': False, + 'twoTildeGroup': False, + 'invalidTildeGroup': False + } + expected_issues = { + 'noTildeGroup': [], + 'oneTildeGroup': self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['oneTildeGroup'], + char_index=56), + 'twoTildeGroup': + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['twoTildeGroup'], char_index=49) + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['twoTildeGroup'], char_index=77), + 'invalidTildeGroup': + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['invalidTildeGroup'], char_index=49) + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['invalidTildeGroup'], char_index=77) + + self.format_error(ValidationErrors.TILDES_UNSUPPORTED, + source_string=test_strings['invalidTildeGroup'], char_index=147) + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class RequiredTags(TestHed): + schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' + + @staticmethod + def string_obj_func(validator): + return partial(validator._group_validator.run_all_tags_validators) + + def test_includes_all_required_tags(self): + test_strings = { + 'complete': 'Animal-agent, Action', + 'missingAgent': 'Action', + 'missingAction': 'Animal-agent', + 'inSubGroup': 'Animal-agent, (Action)', + 'missingAll': 'Event' + } + expected_results = { + 'complete': True, + 'missingAgent': False, + 'missingAction': False, + 'inSubGroup': True, + 'missingAll': False, + } + expected_issues = { + 'complete': [], + 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, + tag_namespace='Agent/Animal-agent'), + 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action'), + 'inSubGroup': [], + 'missingAll': + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Agent/Animal-agent'), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_multiple_copies_unique_tags(self): + test_strings = { + 'legal': 'Event-context,' + '(Vehicle,Event), Animal-agent, Action', + 'multipleDesc': 'Event-context,' + 'Event-context,' + 'Vehicle,(Vehicle,Event-context), Animal-agent, Action', + # I think this is illegal in hed2 style schema now. + 'multipleDescIncShort': 'Event-context,' + 'Organizational-property/Event-context, Animal-agent, Action' + } + expected_results = { + 'legal': True, + 'multipleDesc': False, + 'multipleDescIncShort': False + } + expected_issues = { + 'legal': [], + 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, + tag_namespace='Property/Organizational-property/Event-context'), + 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, + tag_namespace='Property/Organizational-property/Event-context'), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class RequiredTagInDefinition(TestHed): + schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' + + @staticmethod + def string_obj_func(validator): + from hed.validator import DefValidator + def_dict = DefValidator() + return partial(def_dict.check_for_definitions) + + def test_includes_all_required_tags(self): + test_strings = { + 'complete': 'Animal-agent, Action, (Definition/labelWithRequired, (Action))', + } + expected_results = { + 'complete': False, + } + expected_issues = { + 'complete': self.format_error(DefinitionErrors.BAD_PROP_IN_DEFINITION, tag=3, def_name='labelWithRequired'), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + +class TestHedSpecialUnits(TestHed): + compute_forms = True + schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' + + @staticmethod + def string_obj_func(validator): + return partial(validator._validate_individual_tags_in_hed_string) + + def test_special_units(self): + test_strings = { + 'specialAllowedCharCurrency': 'Item/Currency-test/$ 100', + 'specialNotAllowedCharCurrency': 'Item/Currency-test/@ 100', + 'specialAllowedCharCurrencyAsSuffix': 'Item/Currency-test/100 $', + # Update tests - 8.0 currently has no clockTime nodes. + # 'properTime': 'Item/clockTime-test/08:30', + # 'invalidTime': 'Item/clockTime-test/54:54' + } + expected_results = { + # 'properTime': True, + # 'invalidTime': True, + 'specialAllowedCharCurrency': True, + 'specialNotAllowedCharCurrency': False, + 'specialAllowedCharCurrencyAsSuffix': False, + } + legal_currency_units = ['dollar', "$", "point"] + + expected_issues = { + # 'properTime': [], + # 'invalidTime': [], + 'specialAllowedCharCurrency': [], + 'specialNotAllowedCharCurrency': self.format_error("INVALID_VALUE_CLASS_VALUE", + value_class="numericClass", tag=0, index_in_tag=0, + index_in_tag_end=24) + + self.format_error(ValidationErrors.UNITS_INVALID,tag=0, units=legal_currency_units), + 'specialAllowedCharCurrencyAsSuffix': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, + units=legal_currency_units), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + +class TestHedAllowedCharacters(TestHed): + compute_forms = True + schema_file = '../data/schema_tests/schema_utf8.mediawiki' + + @staticmethod + def string_obj_func(validator): + return partial(validator._validate_individual_tags_in_hed_string) + + def test_special_units(self): + test_strings = { + 'ascii': 'Ascii/bad-date', + 'illegalTab': 'Ascii/bad-dat\t', + 'allowTab': 'Nonascii/Cafe\t', + } + expected_results = { + 'ascii': True, + 'illegalTab': False, + 'allowTab': True + } + + expected_issues = { + 'ascii': [], + 'illegalTab': self.format_error(ValidationErrors.INVALID_VALUE_CLASS_CHARACTER, tag=0, + index_in_tag=13, index_in_tag_end=14, value_class="textClass"), + 'allowTab': [] + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/validator/test_tag_validator_base.py b/tests/validator/test_tag_validator_base.py index ac362da3..b91407d8 100644 --- a/tests/validator/test_tag_validator_base.py +++ b/tests/validator/test_tag_validator_base.py @@ -1,102 +1,103 @@ -import unittest -import os -from hed.models.hed_string import HedString -from hed.validator.hed_validator import HedValidator -from hed.errors import error_reporter -from hed.errors import ErrorHandler, ErrorContext -from hed import schema - - -#todo: update these tests(TagValidator no longer exists) -class TestHedBase(unittest.TestCase): - schema_file = None - hed_schema = None - - @classmethod - def setUpClass(cls): - if cls.schema_file and not cls.hed_schema: - hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), cls.schema_file) - cls.hed_schema = schema.load_schema(hed_xml) - elif not cls.hed_schema: - raise ValueError("No schema set for test case") - cls.error_handler = error_reporter.ErrorHandler() - - def format_error(self, error_type, *args, **kwargs): - """ - The parameters vary based on what type of error this is. - - Note: If you want to pass a tag as a number to this function, you will need to pass tag as a keyword. - - Parameters: - error_type (str): The type of error for this. Registered with @hed_error or @hed_tag_error. - args (args): The rest of the unnamed args. - kwargs: The other parameters to pass down to the error handling func. - - Returns: - list: A list consisting of a single dictionary representing an error. - - """ - _ = ErrorHandler.format_error(error_type, *args, **kwargs) - # Save off params - params = [error_type, args, kwargs] - # return params - return [params] - - def format_errors_fully(self, error_handler, hed_string, params): - formatted_errors = [] - for code, args, kwargs in params: - if 'tag' in kwargs and isinstance(kwargs['tag'], int): - tag_index = kwargs['tag'] - if tag_index >= 1000: - tag_index = tag_index - 1000 - source_list = hed_string.get_all_groups() - else: - source_list = hed_string.get_all_tags() - if tag_index >= len(source_list): - raise ValueError("Bad group or tax index in expected errors for unit tests") - kwargs['tag'] = source_list[tag_index] - formatted_errors += error_handler.format_error_with_context(code, *args, **kwargs) - - return formatted_errors - - -class TestValidatorBase(TestHedBase): - compute_forms = True - hed_schema = None - - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.error_handler = error_reporter.ErrorHandler() - cls.semantic_hed_input_reader = HedValidator(hed_schema=cls.hed_schema) - - def validator_base(self, test_strings, expected_results, expected_issues, test_function, - hed_schema, check_for_warnings=False): - for test_key in test_strings: - hed_string_obj = HedString(test_strings[test_key], self.hed_schema) - error_handler = ErrorHandler(check_for_warnings=check_for_warnings) - error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) - test_issues = [] - if self.compute_forms: - test_issues += hed_string_obj._calculate_to_canonical_forms(hed_schema) - if not test_issues: - test_issues += test_function(hed_string_obj) - expected_params = expected_issues[test_key] - expected_result = expected_results[test_key] - expected_issue = self.format_errors_fully(error_handler, hed_string=hed_string_obj, - params=expected_params) - error_handler.add_context_and_filter(test_issues) - test_result = not test_issues - - # print(test_key) - # print(str(expected_issue)) - # print(str(test_issues)) - error_handler.pop_error_context() - self.assertEqual(test_result, expected_result, test_strings[test_key]) - self.assertCountEqual(test_issues, expected_issue, test_strings[test_key]) - - def validator_semantic(self, test_strings, expected_results, expected_issues, check_for_warnings): - validator = self.semantic_hed_input_reader - self.validator_base(test_strings, expected_results, expected_issues, - self.string_obj_func(validator), check_for_warnings=check_for_warnings, - hed_schema=validator._hed_schema) +import unittest +import os +from hed.models.hed_string import HedString +from hed.validator.hed_validator import HedValidator +from hed.errors import error_reporter +from hed.errors import ErrorHandler, ErrorContext +from hed import schema + + +#todo: update these tests(TagValidator no longer exists) +class TestHedBase(unittest.TestCase): + schema_file = None + hed_schema = None + + @classmethod + def setUpClass(cls): + if cls.schema_file and not cls.hed_schema: + hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), cls.schema_file) + cls.hed_schema = schema.load_schema(hed_xml) + elif not cls.hed_schema: + raise ValueError("No schema set for test case") + cls.error_handler = error_reporter.ErrorHandler() + + def format_error(self, error_type, *args, **kwargs): + """ + The parameters vary based on what type of error this is. + + Note: If you want to pass a tag as a number to this function, you will need to pass tag as a keyword. + + Parameters: + error_type (str): The type of error for this. Registered with @hed_error or @hed_tag_error. + args (args): The rest of the unnamed args. + kwargs: The other parameters to pass down to the error handling func. + + Returns: + list: A list consisting of a single dictionary representing an error. + + """ + _ = ErrorHandler.format_error(error_type, *args, **kwargs) + # Save off params + params = [error_type, args, kwargs] + # return params + return [params] + + def format_errors_fully(self, error_handler, hed_string, params): + formatted_errors = [] + for code, args, kwargs in params: + if 'tag' in kwargs and isinstance(kwargs['tag'], int): + tag_index = kwargs['tag'] + if tag_index >= 1000: + tag_index = tag_index - 1000 + source_list = hed_string.get_all_groups() + else: + source_list = hed_string.get_all_tags() + if tag_index >= len(source_list): + raise ValueError("Bad group or tax index in expected errors for unit tests") + kwargs['tag'] = source_list[tag_index] + formatted_errors += error_handler.format_error_with_context(code, *args, **kwargs) + + return formatted_errors + + +class TestValidatorBase(TestHedBase): + compute_forms = True + hed_schema = None + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.error_handler = error_reporter.ErrorHandler() + cls.semantic_hed_input_reader = HedValidator(hed_schema=cls.hed_schema) + + def validator_base(self, test_strings, expected_results, expected_issues, test_function, + hed_schema, check_for_warnings=False): + for test_key in test_strings: + print(test_key) + hed_string_obj = HedString(test_strings[test_key], self.hed_schema) + error_handler = ErrorHandler(check_for_warnings=check_for_warnings) + error_handler.push_error_context(ErrorContext.HED_STRING, hed_string_obj) + test_issues = [] + if self.compute_forms: + test_issues += hed_string_obj._calculate_to_canonical_forms(hed_schema) + if not test_issues: + test_issues += test_function(hed_string_obj) + expected_params = expected_issues[test_key] + expected_result = expected_results[test_key] + expected_issue = self.format_errors_fully(error_handler, hed_string=hed_string_obj, + params=expected_params) + error_handler.add_context_and_filter(test_issues) + test_result = not test_issues + + + # print(str(expected_issue)) + # print(str(test_issues)) + # error_handler.pop_error_context() + self.assertEqual(test_result, expected_result, test_strings[test_key]) + self.assertCountEqual(test_issues, expected_issue, test_strings[test_key]) + + def validator_semantic(self, test_strings, expected_results, expected_issues, check_for_warnings): + validator = self.semantic_hed_input_reader + self.validator_base(test_strings, expected_results, expected_issues, + self.string_obj_func(validator), check_for_warnings=check_for_warnings, + hed_schema=validator._hed_schema) diff --git a/tests/validator/test_tag_validator_library.py b/tests/validator/test_tag_validator_library.py index d942c8ae..30e68d91 100644 --- a/tests/validator/test_tag_validator_library.py +++ b/tests/validator/test_tag_validator_library.py @@ -1,481 +1,485 @@ -import unittest -import os - -from hed.errors import error_reporter -from hed import schema -from hed.errors.error_types import ValidationErrors, DefinitionErrors -from hed.schema.hed_schema_group import HedSchemaGroup -from hed.errors.exceptions import HedFileError -from tests.validator.test_tag_validator_base import TestValidatorBase -from functools import partial - - -class TestHed3(TestValidatorBase): - schema_file = None - - @classmethod - def setUpClass(cls): - schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' - hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) - hed_schema1 = schema.load_schema(hed_xml) - hed_schema2 = schema.load_schema(hed_xml, schema_namespace="tl:") - cls.hed_schema = HedSchemaGroup([hed_schema1, hed_schema2]) - - cls.error_handler = error_reporter.ErrorHandler() - super().setUpClass() - - def test_invalid_load(self): - schema_file = '../data/schema_tests/HED8.0.0t.xml' - hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) - hed_schema1 = schema.load_schema(hed_xml, schema_namespace="tl:") - hed_schema2 = schema.load_schema(hed_xml, schema_namespace="tl:") - - self.assertRaises(HedFileError, HedSchemaGroup, [hed_schema1, hed_schema2]) - - def test_invalid_load_prefix(self): - schema_file = '../data/schema_tests/HED8.0.0t.xml' - hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) - hed_schema1 = schema.load_schema(hed_xml) - hed_schema2 = schema.load_schema(hed_xml) - - self.assertRaises(HedFileError, HedSchemaGroup, [hed_schema1, hed_schema2]) - - -class IndividualHedTagsShort(TestHed3): - @staticmethod - def string_obj_func(validator): - return partial(validator._validate_individual_tags_in_hed_string) - - def test_exist_in_schema(self): - test_strings = { - 'takesValue': 'tl:Duration/3 ms', - 'full': 'tl:Animal-agent', - 'extensionsAllowed': 'tl:Item/Beaver', - 'leafExtension': 'tl:Experiment-procedure/Something', - 'nonExtensionsAllowed': 'tl:Event/Nonsense', - 'invalidExtension': 'tl:Agent/Red', - 'invalidExtension2': 'tl:Agent/Red/Extension2', - 'usedToBeIllegalComma': 'tl:Label/This is a label,tl:This/Is/A/Tag', - 'legalDef': 'tl:Def/Item', - 'legalDefExpand': 'tl:Def-expand/Item', - 'illegalDefinition': 'tl:Definition/Item', - 'unknownPrefix': 'ul:Definition/Item' - } - expected_results = { - 'takesValue': True, - 'full': True, - 'extensionsAllowed': True, - 'leafExtension': False, - 'nonExtensionsAllowed': False, - 'invalidExtension': False, - 'invalidExtension2': False, - 'usedToBeIllegalComma': False, - 'legalDef': True, - 'legalDefExpand': True, - 'illegalDefinition': False, - 'unknownPrefix': False - } - expected_issues = { - 'takesValue': [], - 'full': [], - 'extensionsAllowed': [], - 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), - 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), - 'invalidExtension': self.format_error( - ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=9, index_in_tag_end=12, - expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + - "/Color/CSS-color/Red-color/Red"), - 'invalidExtension2': self.format_error( - ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=9, index_in_tag_end=12, - expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + - "/Color/CSS-color/Red-color/Red"), - 'usedToBeIllegalComma': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, tag=1, - index_in_tag=3, index_in_tag_end=7), - 'legalDef': [], - 'legalDefExpand': [], - 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0), - 'unknownPrefix': self.format_error( - ValidationErrors.HED_LIBRARY_UNMATCHED, tag=0, unknown_prefix="ul:", known_prefixes=["", "tl:"]), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_proper_capitalization(self): - test_strings = { - 'proper': 'tl:Event/Sensory-event', - 'camelCase': 'tl:EvEnt/Sensory-event', - 'takesValue': 'tl:Sampling-rate/20 Hz', - 'numeric': 'tl:Statistical-uncertainty/20', - 'lowercase': 'tl:Event/sensory-event' - } - expected_results = { - 'proper': True, - 'camelCase': True, - 'takesValue': True, - 'numeric': True, - 'lowercase': False - } - expected_issues = { - 'proper': [], - 'camelCase': [], - 'takesValue': [], - 'numeric': [], - 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_child_required(self): - test_strings = { - 'hasChild': 'tl:Experimental-stimulus', - 'missingChild': 'tl:Label' - } - expected_results = { - 'hasChild': True, - 'missingChild': False - } - expected_issues = { - 'hasChild': [], - 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_required_units(self): - test_strings = { - 'hasRequiredUnit': 'Duration/3 ms', - 'missingRequiredUnit': 'Duration/3', - 'notRequiredNoNumber': 'Age', - 'notRequiredNumber': 'Age/0.5', - 'notRequiredScientific': 'Age/5.2e-1', - 'timeValue': 'Clock-face/08:30', - # Update test - This one is currently marked as valid because clock face isn't in hed3 - 'invalidTimeValue': 'Clock-face/8:30', - } - expected_results = { - 'hasRequiredUnit': True, - 'missingRequiredUnit': False, - 'notRequiredNoNumber': True, - 'notRequiredNumber': True, - 'notRequiredScientific': True, - 'timeValue': False, - 'invalidTimeValue': False, - } - # legal_clock_time_units = ['hour:min', 'hour:min:sec'] - expected_issues = { - 'hasRequiredUnit': [], - 'missingRequiredUnit': self.format_error( - ValidationErrors.UNITS_MISSING, tag=0, default_unit='s'), - 'notRequiredNoNumber': [], - 'notRequiredNumber': [], - 'notRequiredScientific': [], - 'timeValue': self.format_error( - ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), - 'invalidTimeValue': self.format_error( - ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_correct_units(self): - test_strings = { - 'correctUnit': 'tl:Duration/3 ms', - 'correctUnitScientific': 'tl:Duration/3.5e1 ms', - 'correctPluralUnit': 'tl:Duration/3 milliseconds', - 'correctNoPluralUnit': 'tl:Frequency/3 hertz', - 'correctNonSymbolCapitalizedUnit': 'tl:Duration/3 MilliSeconds', - 'correctSymbolCapitalizedUnit': 'tl:Frequency/3 kHz', - 'incorrectUnit': 'tl:Duration/3 cm', - 'incorrectPluralUnit': 'tl:Frequency/3 hertzs', - 'incorrectSymbolCapitalizedUnit': 'tl:Frequency/3 hz', - 'incorrectSymbolCapitalizedUnitModifier': 'tl:Frequency/3 KHz', - 'notRequiredNumber': 'tl:Statistical-accuracy/0.5', - 'notRequiredScientific': 'tl:Statistical-accuracy/5e-1', - 'specialAllowedCharBadUnit': 'tl:Creation-date/bad_date', - 'specialAllowedCharUnit': 'tl:Creation-date/1900-01-01T01:01:01', - # todo: restore these when we have a currency node in the valid beta schema. - # 'specialAllowedCharCurrency': 'Event/Currency-Test/$100', - # 'specialNotAllowedCharCurrency': 'Event/Currency-Test/@100' - # Update tests - 8.0 currently has no clockTime nodes. - # 'properTime': 'Item/2D shape/Clock face/08:30', - # 'invalidTime': 'Item/2D shape/Clock face/54:54' - } - expected_results = { - 'correctUnit': True, - 'correctUnitScientific': True, - 'correctPluralUnit': True, - 'correctNoPluralUnit': True, - 'correctNonSymbolCapitalizedUnit': True, - 'correctSymbolCapitalizedUnit': True, - 'incorrectUnit': False, - 'incorrectPluralUnit': False, - 'incorrectSymbolCapitalizedUnit': False, - 'incorrectSymbolCapitalizedUnitModifier': False, - 'notRequiredNumber': True, - 'notRequiredScientific': True, - 'specialAllowedCharBadUnit': False, - 'specialAllowedCharUnit': True, - 'properTime': True, - 'invalidTime': True, - # 'specialAllowedCharCurrency': True, - # 'specialNotAllowedCharCurrency': False, - } - legal_time_units = ['s', 'second', 'day', 'minute', 'hour'] - # legal_clock_time_units = ['hour:min', 'hour:min:sec'] - # legal_datetime_units = ['YYYY-MM-DDThh:mm:ss'] - legal_freq_units = ['Hz', 'hertz'] - # legal_currency_units = ['dollar', "$", "point"] - - expected_issues = { - 'correctUnit': [], - 'correctUnitScientific': [], - 'correctPluralUnit': [], - 'correctNoPluralUnit': [], - 'correctNonSymbolCapitalizedUnit': [], - 'correctSymbolCapitalizedUnit': [], - 'incorrectUnit': self.format_error( - ValidationErrors.UNITS_INVALID, tag=0, units=legal_time_units), - 'incorrectPluralUnit': self.format_error( - ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), - 'incorrectSymbolCapitalizedUnit': self.format_error( - ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), - 'incorrectSymbolCapitalizedUnitModifier': self.format_error( - ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), - 'notRequiredNumber': [], - 'notRequiredScientific': [], - 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.VALUE_INVALID, tag=0), - 'specialAllowedCharUnit': [], - # 'properTime': [], - # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, - # units=legal_clock_time_units) - # 'specialAllowedCharCurrency': [], - # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, - # tag=0, - # units=legal_currency_units), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_extensions(self): - test_strings = { - 'invalidExtension': 'tl:Experiment-control/Animal-agent', - } - expected_results = { - 'invalidExtension': False, - } - expected_issues = { - 'invalidExtension': self.format_error(ValidationErrors.INVALID_PARENT_NODE, tag=0, - index_in_tag=19 + 3, index_in_tag_end=31 + 3, - expected_parent_tag="Agent/Animal-agent"), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_invalid_placeholder_in_normal_string(self): - test_strings = { - 'invalidPlaceholder': 'tl:Duration/# ms', - } - expected_results = { - 'invalidPlaceholder': False, - } - expected_issues = { - 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, - tag=0, index_in_tag=12, index_in_tag_end=13, - actual_error=ValidationErrors.PLACEHOLDER_INVALID), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_span_reporting(self): - test_strings = { - 'orgTagDifferent': 'tl:Duration/23 hz', - 'orgTagDifferent2': 'tl:Duration/23 hz, Duration/23 hz', - } - expected_results = { - 'orgTagDifferent': False, - 'orgTagDifferent2': False, - } - tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] - expected_issues = { - 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, - units=tag_unit_class_units), - 'orgTagDifferent2': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, - units=tag_unit_class_units) - + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, - units=tag_unit_class_units), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class TestTagLevels3(TestHed3): - @staticmethod - def string_obj_func(validator): - return validator._group_validator.run_tag_level_validators - - def test_no_duplicates(self): - test_strings = { - 'topLevelDuplicate': 'tl:Event/Sensory-event,tl:Event/Sensory-event', - 'groupDuplicate': 'tl:Item/Object/Man-made-object/VehicleTrain,(tl:Event/Sensory-event,' - 'tl:Purple-color/Purple,tl:Event/Sensory-event)', - 'noDuplicate': 'tl:Event/Sensory-event,' - 'tl:Item/Object/Man-made-object/VehicleTrain,' - 'tl:Purple-color/Purple', - 'legalDuplicate': 'tl:Item/Object/Man-made-object/VehicleTrain,\ - (tl:Item/Object/Man-made-object/VehicleTrain,' - 'tl:Event/Sensory-event)', - } - expected_results = { - 'topLevelDuplicate': False, - 'groupDuplicate': False, - 'legalDuplicate': True, - 'noDuplicate': True - } - expected_issues = { - 'topLevelDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), - 'groupDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=3), - 'legalDuplicate': [], - 'noDuplicate': [] - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_no_duplicates_semantic(self): - test_strings = { - 'mixedLevelDuplicates': 'tl:Man-made-object/Vehicle/Boat, tl:Vehicle/Boat', - 'mixedLevelDuplicates2': 'tl:Man-made-object/Vehicle/Boat, tl:Boat' - } - expected_results = { - 'mixedLevelDuplicates': False, - 'mixedLevelDuplicates2': False, - } - expected_issues = { - 'mixedLevelDuplicates': self.format_error(ValidationErrors.HED_TAG_REPEATED, - tag=1), - 'mixedLevelDuplicates2': self.format_error(ValidationErrors.HED_TAG_REPEATED, - tag=1), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_topLevelTagGroup_validation(self): - test_strings = { - 'invalid1': 'tl:Definition/InvalidDef', - 'valid1': '(tl:Definition/ValidDef)', - 'valid2': '(tl:Definition/ValidDef), (tl:Definition/ValidDef2)', - 'invalid2': '(tl:Event, (tl:Definition/InvalidDef2))', - 'invalidTwoInOne': '(tl:Definition/InvalidDef2, tl:Definition/InvalidDef3)', - 'invalid2TwoInOne': '(tl:Definition/InvalidDef2, tl:Onset)', - } - expected_results = { - 'invalid1': False, - 'valid1': True, - 'valid2': True, - 'invalid2': False, - 'invalidTwoInOne': False, - 'invalid2TwoInOne': False, - } - expected_issues = { - 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, - tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) - + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), - 'valid1': [], - 'valid2': [], - 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) - + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), - 'invalidTwoInOne': self.format_error( - ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, - multiple_tags="tl:Definition/InvalidDef3".split(", ")), - 'invalid2TwoInOne': self.format_error( - ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, - multiple_tags="tl:Onset".split(", ")), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - def test_taggroup_validation(self): - test_strings = { - 'invalid1': 'tl:Def-Expand/InvalidDef', - 'invalid2': 'tl:Def-Expand/InvalidDef, tl:Event, (tl:Event)', - 'invalid3': 'tl:Event, (tl:Event), tl:Def-Expand/InvalidDef', - 'valid1': '(tl:Def-Expand/ValidDef)', - 'valid2': '(tl:Def-Expand/ValidDef), (tl:Def-Expand/ValidDef2)', - 'valid3': '(tl:Event, (tl:Def-Expand/InvalidDef2))', - # This case should possibly be flagged as invalid - 'semivalid1': '(tl:Def-Expand/InvalidDef2, tl:Def-Expand/InvalidDef3)', - 'semivalid2': '(tl:Def-Expand/InvalidDef2, tl:Onset)', - } - expected_results = { - 'invalid1': False, - 'invalid2': False, - 'invalid3': False, - 'valid1': True, - 'valid2': True, - 'valid3': True, - 'semivalid1': True, - 'semivalid2': True, - } - expected_issues = { - 'invalid1': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=0), - 'invalid2': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=0), - 'invalid3': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=2), - 'valid1': [], - 'valid2': [], - 'valid3': [], - 'semivalid1': [], - 'semivalid2': [] - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -class RequiredTags(TestHed3): - @staticmethod - def string_obj_func(validator): - return partial(validator._group_validator.run_all_tags_validators) - - def test_includes_all_required_tags(self): - test_strings = { - 'complete': 'Animal-agent, Action, tl:Animal-agent, tl:Action', - 'missingAgent': 'Action, tl:Animal-agent, tl:Action', - 'missingAction': 'Animal-agent, tl:Animal-agent, tl:Action', - 'inSubGroup': 'Animal-agent, (Action, tl:Animal-agent, tl:Action)', - 'missingAll': 'Event' - } - expected_results = { - 'complete': True, - 'missingAgent': False, - 'missingAction': False, - 'inSubGroup': True, - 'missingAll': False, - } - expected_issues = { - 'complete': [], - 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, - tag_namespace='Agent/Animal-agent'), - 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action'), - 'inSubGroup': [], - 'missingAll': - self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action') - + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Agent/Animal-agent') - + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='tl:Action') - + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='tl:Agent/Animal-agent'), - } - self.validator_semantic(test_strings, expected_results, expected_issues, True) - - def test_multiple_copies_unique_tags(self): - test_strings = { - 'legal': 'tl:Event-context,' - '(Vehicle,Event), Animal-agent, Action, tl:Animal-agent, tl:Action', - 'multipleDesc': 'tl:Event-context,' - 'tl:Event-context,' - 'Vehicle,(Vehicle,tl:Event-context), Animal-agent, Action, tl:Animal-agent, tl:Action', - 'multipleDescIncShort': 'tl:Event-context,' - 'tl:Organizational-property/Event-context,' - ' Animal-agent, Action, tl:Animal-agent, tl:Action' - } - expected_results = { - 'legal': True, - 'multipleDesc': False, - 'multipleDescIncShort': False - } - expected_issues = { - 'legal': [], - 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, - tag_namespace='tl:Property/Organizational-property/Event-context'), - 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, - tag_namespace='tl:Property/Organizational-property/Event-context'), - } - self.validator_semantic(test_strings, expected_results, expected_issues, False) - - -if __name__ == '__main__': - unittest.main() +import unittest +import os + +from hed.errors import error_reporter +from hed import schema +from hed.errors.error_types import ValidationErrors, DefinitionErrors +from hed.schema.hed_schema_group import HedSchemaGroup +from hed.errors.exceptions import HedFileError +from tests.validator.test_tag_validator_base import TestValidatorBase +from functools import partial + + +class TestHed3(TestValidatorBase): + schema_file = None + + @classmethod + def setUpClass(cls): + schema_file = '../data/validator_tests/HED8.0.0_added_tests.mediawiki' + hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) + hed_schema1 = schema.load_schema(hed_xml) + hed_schema2 = schema.load_schema(hed_xml, schema_namespace="tl:") + cls.hed_schema = HedSchemaGroup([hed_schema1, hed_schema2]) + + cls.error_handler = error_reporter.ErrorHandler() + super().setUpClass() + + def test_invalid_load(self): + schema_file = '../data/schema_tests/HED8.0.0t.xml' + hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) + hed_schema1 = schema.load_schema(hed_xml, schema_namespace="tl:") + hed_schema2 = schema.load_schema(hed_xml, schema_namespace="tl:") + + self.assertRaises(HedFileError, HedSchemaGroup, [hed_schema1, hed_schema2]) + + def test_invalid_load_prefix(self): + schema_file = '../data/schema_tests/HED8.0.0t.xml' + hed_xml = os.path.join(os.path.dirname(os.path.realpath(__file__)), schema_file) + hed_schema1 = schema.load_schema(hed_xml) + hed_schema2 = schema.load_schema(hed_xml) + + self.assertRaises(HedFileError, HedSchemaGroup, [hed_schema1, hed_schema2]) + + +class IndividualHedTagsShort(TestHed3): + @staticmethod + def string_obj_func(validator): + return partial(validator._validate_individual_tags_in_hed_string) + + def test_exist_in_schema(self): + test_strings = { + 'takesValue': 'tl:Duration/3 ms', + 'full': 'tl:Animal-agent', + 'extensionsAllowed': 'tl:Item/Beaver', + 'leafExtension': 'tl:Experiment-procedure/Something', + 'nonExtensionsAllowed': 'tl:Event/Nonsense', + 'invalidExtension': 'tl:Agent/Red', + 'invalidExtension2': 'tl:Agent/Red/Extension2', + 'usedToBeIllegalComma': 'tl:Label/This is a label,tl:This/Is/A/Tag', + 'legalDef': 'tl:Def/Item', + 'legalDefExpand': 'tl:Def-expand/Item', + 'illegalDefinition': 'tl:Definition/Item', + 'unknownPrefix': 'ul:Definition/Item' + } + expected_results = { + 'takesValue': True, + 'full': True, + 'extensionsAllowed': True, + 'leafExtension': False, + 'nonExtensionsAllowed': False, + 'invalidExtension': False, + 'invalidExtension2': False, + 'usedToBeIllegalComma': False, + 'legalDef': True, + 'legalDefExpand': True, + 'illegalDefinition': False, + 'unknownPrefix': False + } + expected_issues = { + 'takesValue': [], + 'full': [], + 'extensionsAllowed': [], + 'leafExtension': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'nonExtensionsAllowed': self.format_error(ValidationErrors.TAG_EXTENSION_INVALID, tag=0), + 'invalidExtension': self.format_error( + ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=9, index_in_tag_end=12, + expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + + "/Color/CSS-color/Red-color/Red"), + 'invalidExtension2': self.format_error( + ValidationErrors.INVALID_PARENT_NODE, tag=0, index_in_tag=9, index_in_tag_end=12, + expected_parent_tag="Property/Sensory-property/Sensory-attribute/Visual-attribute" + + "/Color/CSS-color/Red-color/Red"), + 'usedToBeIllegalComma': self.format_error(ValidationErrors.NO_VALID_TAG_FOUND, tag=1, + index_in_tag=3, index_in_tag_end=7), + 'legalDef': [], + 'legalDefExpand': [], + 'illegalDefinition': self.format_error(DefinitionErrors.BAD_DEFINITION_LOCATION, tag=0), + 'unknownPrefix': self.format_error( + ValidationErrors.HED_LIBRARY_UNMATCHED, tag=0, unknown_prefix="ul:", known_prefixes=["", "tl:"]), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_proper_capitalization(self): + test_strings = { + 'proper': 'tl:Event/Sensory-event', + 'camelCase': 'tl:EvEnt/Sensory-event', + 'takesValue': 'tl:Sampling-rate/20 Hz', + 'numeric': 'tl:Statistical-uncertainty/20', + 'lowercase': 'tl:Event/sensory-event' + } + expected_results = { + 'proper': True, + 'camelCase': True, + 'takesValue': True, + 'numeric': True, + 'lowercase': False + } + expected_issues = { + 'proper': [], + 'camelCase': [], + 'takesValue': [], + 'numeric': [], + 'lowercase': self.format_error(ValidationErrors.STYLE_WARNING, tag=0) + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_child_required(self): + test_strings = { + 'hasChild': 'tl:Experimental-stimulus', + 'missingChild': 'tl:Label' + } + expected_results = { + 'hasChild': True, + 'missingChild': False + } + expected_issues = { + 'hasChild': [], + 'missingChild': self.format_error(ValidationErrors.TAG_REQUIRES_CHILD, tag=0) + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_required_units(self): + test_strings = { + 'hasRequiredUnit': 'Duration/3 ms', + 'missingRequiredUnit': 'Duration/3', + 'notRequiredNoNumber': 'Age', + 'notRequiredNumber': 'Age/0.5', + 'notRequiredScientific': 'Age/5.2e-1', + 'timeValue': 'Clock-face/08:30', + # Update test - This one is currently marked as valid because clock face isn't in hed3 + 'invalidTimeValue': 'Clock-face/8:30', + } + expected_results = { + 'hasRequiredUnit': True, + 'missingRequiredUnit': False, + 'notRequiredNoNumber': True, + 'notRequiredNumber': True, + 'notRequiredScientific': True, + 'timeValue': False, + 'invalidTimeValue': False, + } + # legal_clock_time_units = ['hour:min', 'hour:min:sec'] + expected_issues = { + 'hasRequiredUnit': [], + 'missingRequiredUnit': self.format_error( + ValidationErrors.UNITS_MISSING, tag=0, default_unit='s'), + 'notRequiredNoNumber': [], + 'notRequiredNumber': [], + 'notRequiredScientific': [], + 'timeValue': self.format_error( + ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), + 'invalidTimeValue': self.format_error( + ValidationErrors.TAG_EXTENDED, tag=0, index_in_tag=10, index_in_tag_end=None), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_correct_units(self): + test_strings = { + 'correctUnit': 'tl:Duration/3 ms', + 'correctUnitScientific': 'tl:Duration/3.5e1 ms', + 'correctPluralUnit': 'tl:Duration/3 milliseconds', + 'correctNoPluralUnit': 'tl:Frequency/3 hertz', + 'correctNonSymbolCapitalizedUnit': 'tl:Duration/3 MilliSeconds', + 'correctSymbolCapitalizedUnit': 'tl:Frequency/3 kHz', + 'incorrectUnit': 'tl:Duration/3 cm', + 'incorrectPluralUnit': 'tl:Frequency/3 hertzs', + 'incorrectSymbolCapitalizedUnit': 'tl:Frequency/3 hz', + 'incorrectSymbolCapitalizedUnitModifier': 'tl:Frequency/3 KHz', + 'notRequiredNumber': 'tl:Statistical-accuracy/0.5', + 'notRequiredScientific': 'tl:Statistical-accuracy/5e-1', + 'specialAllowedCharBadUnit': 'tl:Creation-date/bad_date', + 'specialAllowedCharUnit': 'tl:Creation-date/1900-01-01T01:01:01', + # todo: restore these when we have a currency node in the valid beta schema. + # 'specialAllowedCharCurrency': 'Event/Currency-Test/$100', + # 'specialNotAllowedCharCurrency': 'Event/Currency-Test/@100' + # Update tests - 8.0 currently has no clockTime nodes. + # 'properTime': 'Item/2D shape/Clock face/08:30', + # 'invalidTime': 'Item/2D shape/Clock face/54:54' + } + expected_results = { + 'correctUnit': True, + 'correctUnitScientific': True, + 'correctPluralUnit': True, + 'correctNoPluralUnit': True, + 'correctNonSymbolCapitalizedUnit': True, + 'correctSymbolCapitalizedUnit': True, + 'incorrectUnit': False, + 'incorrectPluralUnit': False, + 'incorrectSymbolCapitalizedUnit': False, + 'incorrectSymbolCapitalizedUnitModifier': False, + 'notRequiredNumber': True, + 'notRequiredScientific': True, + 'specialAllowedCharBadUnit': False, + 'specialAllowedCharUnit': True, + 'properTime': True, + 'invalidTime': True, + # 'specialAllowedCharCurrency': True, + # 'specialNotAllowedCharCurrency': False, + } + legal_time_units = ['s', 'second', 'day', 'minute', 'hour'] + # legal_clock_time_units = ['hour:min', 'hour:min:sec'] + # legal_datetime_units = ['YYYY-MM-DDThh:mm:ss'] + legal_freq_units = ['Hz', 'hertz'] + # legal_currency_units = ['dollar', "$", "point"] + + expected_issues = { + 'correctUnit': [], + 'correctUnitScientific': [], + 'correctPluralUnit': [], + 'correctNoPluralUnit': [], + 'correctNonSymbolCapitalizedUnit': [], + 'correctSymbolCapitalizedUnit': [], + 'incorrectUnit': self.format_error( + ValidationErrors.UNITS_INVALID, tag=0, units=legal_time_units), + 'incorrectPluralUnit': self.format_error( + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), + 'incorrectSymbolCapitalizedUnit': self.format_error( + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), + 'incorrectSymbolCapitalizedUnitModifier': self.format_error( + ValidationErrors.UNITS_INVALID, tag=0, units=legal_freq_units), + 'notRequiredNumber': [], + 'notRequiredScientific': [], + 'specialAllowedCharBadUnit': self.format_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, tag=0, + value_class="dateTimeClass", + index_in_tag=0, index_in_tag_end=25), + 'specialAllowedCharUnit': [], + # 'properTime': [], + # 'invalidTime': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, + # units=legal_clock_time_units) + # 'specialAllowedCharCurrency': [], + # 'specialNotAllowedCharCurrency': self.format_error(ValidationErrors.UNITS_INVALID, + # tag=0, + # units=legal_currency_units), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_extensions(self): + test_strings = { + 'invalidExtension': 'tl:Experiment-control/Animal-agent', + } + expected_results = { + 'invalidExtension': False, + } + expected_issues = { + 'invalidExtension': self.format_error(ValidationErrors.INVALID_PARENT_NODE, tag=0, + index_in_tag=19 + 3, index_in_tag_end=31 + 3, + expected_parent_tag="Agent/Animal-agent"), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_invalid_placeholder_in_normal_string(self): + test_strings = { + 'invalidPlaceholder': 'tl:Duration/# ms', + } + expected_results = { + 'invalidPlaceholder': False, + } + expected_issues = { + 'invalidPlaceholder': self.format_error(ValidationErrors.INVALID_TAG_CHARACTER, + tag=0, index_in_tag=12, index_in_tag_end=13, + actual_error=ValidationErrors.PLACEHOLDER_INVALID) + + self.format_error(ValidationErrors.INVALID_VALUE_CLASS_VALUE, tag=0, + index_in_tag=0, index_in_tag_end=16, value_class="numericClass") + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_span_reporting(self): + test_strings = { + 'orgTagDifferent': 'tl:Duration/23 hz', + 'orgTagDifferent2': 'tl:Duration/23 hz, Duration/23 hz', + } + expected_results = { + 'orgTagDifferent': False, + 'orgTagDifferent2': False, + } + tag_unit_class_units = ['day', 'hour', 'minute', 's', 'second'] + expected_issues = { + 'orgTagDifferent': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, + units=tag_unit_class_units), + 'orgTagDifferent2': self.format_error(ValidationErrors.UNITS_INVALID, tag=0, + units=tag_unit_class_units) + + self.format_error(ValidationErrors.UNITS_INVALID, tag=1, + units=tag_unit_class_units), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class TestTagLevels3(TestHed3): + @staticmethod + def string_obj_func(validator): + return validator._group_validator.run_tag_level_validators + + def test_no_duplicates(self): + test_strings = { + 'topLevelDuplicate': 'tl:Event/Sensory-event,tl:Event/Sensory-event', + 'groupDuplicate': 'tl:Item/Object/Man-made-object/VehicleTrain,(tl:Event/Sensory-event,' + 'tl:Purple-color/Purple,tl:Event/Sensory-event)', + 'noDuplicate': 'tl:Event/Sensory-event,' + 'tl:Item/Object/Man-made-object/VehicleTrain,' + 'tl:Purple-color/Purple', + 'legalDuplicate': 'tl:Item/Object/Man-made-object/VehicleTrain,\ + (tl:Item/Object/Man-made-object/VehicleTrain,' + 'tl:Event/Sensory-event)', + } + expected_results = { + 'topLevelDuplicate': False, + 'groupDuplicate': False, + 'legalDuplicate': True, + 'noDuplicate': True + } + expected_issues = { + 'topLevelDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=1), + 'groupDuplicate': self.format_error(ValidationErrors.HED_TAG_REPEATED, tag=3), + 'legalDuplicate': [], + 'noDuplicate': [] + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_no_duplicates_semantic(self): + test_strings = { + 'mixedLevelDuplicates': 'tl:Man-made-object/Vehicle/Boat, tl:Vehicle/Boat', + 'mixedLevelDuplicates2': 'tl:Man-made-object/Vehicle/Boat, tl:Boat' + } + expected_results = { + 'mixedLevelDuplicates': False, + 'mixedLevelDuplicates2': False, + } + expected_issues = { + 'mixedLevelDuplicates': self.format_error(ValidationErrors.HED_TAG_REPEATED, + tag=1), + 'mixedLevelDuplicates2': self.format_error(ValidationErrors.HED_TAG_REPEATED, + tag=1), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_topLevelTagGroup_validation(self): + test_strings = { + 'invalid1': 'tl:Definition/InvalidDef', + 'valid1': '(tl:Definition/ValidDef)', + 'valid2': '(tl:Definition/ValidDef), (tl:Definition/ValidDef2)', + 'invalid2': '(tl:Event, (tl:Definition/InvalidDef2))', + 'invalidTwoInOne': '(tl:Definition/InvalidDef2, tl:Definition/InvalidDef3)', + 'invalid2TwoInOne': '(tl:Definition/InvalidDef2, tl:Onset)', + } + expected_results = { + 'invalid1': False, + 'valid1': True, + 'valid2': True, + 'invalid2': False, + 'invalidTwoInOne': False, + 'invalid2TwoInOne': False, + } + expected_issues = { + 'invalid1': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, + tag=0, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=0), + 'valid1': [], + 'valid2': [], + 'invalid2': self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1, actual_error=ValidationErrors.DEFINITION_INVALID) + + self.format_error(ValidationErrors.HED_TOP_LEVEL_TAG, tag=1), + 'invalidTwoInOne': self.format_error( + ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, + multiple_tags="tl:Definition/InvalidDef3".split(", ")), + 'invalid2TwoInOne': self.format_error( + ValidationErrors.HED_MULTIPLE_TOP_TAGS, tag=0, + multiple_tags="tl:Onset".split(", ")), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + def test_taggroup_validation(self): + test_strings = { + 'invalid1': 'tl:Def-Expand/InvalidDef', + 'invalid2': 'tl:Def-Expand/InvalidDef, tl:Event, (tl:Event)', + 'invalid3': 'tl:Event, (tl:Event), tl:Def-Expand/InvalidDef', + 'valid1': '(tl:Def-Expand/ValidDef)', + 'valid2': '(tl:Def-Expand/ValidDef), (tl:Def-Expand/ValidDef2)', + 'valid3': '(tl:Event, (tl:Def-Expand/InvalidDef2))', + # This case should possibly be flagged as invalid + 'semivalid1': '(tl:Def-Expand/InvalidDef2, tl:Def-Expand/InvalidDef3)', + 'semivalid2': '(tl:Def-Expand/InvalidDef2, tl:Onset)', + } + expected_results = { + 'invalid1': False, + 'invalid2': False, + 'invalid3': False, + 'valid1': True, + 'valid2': True, + 'valid3': True, + 'semivalid1': True, + 'semivalid2': True, + } + expected_issues = { + 'invalid1': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=0), + 'invalid2': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=0), + 'invalid3': self.format_error(ValidationErrors.HED_TAG_GROUP_TAG, tag=2), + 'valid1': [], + 'valid2': [], + 'valid3': [], + 'semivalid1': [], + 'semivalid2': [] + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +class RequiredTags(TestHed3): + @staticmethod + def string_obj_func(validator): + return partial(validator._group_validator.run_all_tags_validators) + + def test_includes_all_required_tags(self): + test_strings = { + 'complete': 'Animal-agent, Action, tl:Animal-agent, tl:Action', + 'missingAgent': 'Action, tl:Animal-agent, tl:Action', + 'missingAction': 'Animal-agent, tl:Animal-agent, tl:Action', + 'inSubGroup': 'Animal-agent, (Action, tl:Animal-agent, tl:Action)', + 'missingAll': 'Event' + } + expected_results = { + 'complete': True, + 'missingAgent': False, + 'missingAction': False, + 'inSubGroup': True, + 'missingAll': False, + } + expected_issues = { + 'complete': [], + 'missingAgent': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, + tag_namespace='Agent/Animal-agent'), + 'missingAction': self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action'), + 'inSubGroup': [], + 'missingAll': + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='Agent/Animal-agent') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='tl:Action') + + self.format_error(ValidationErrors.REQUIRED_TAG_MISSING, tag_namespace='tl:Agent/Animal-agent'), + } + self.validator_semantic(test_strings, expected_results, expected_issues, True) + + def test_multiple_copies_unique_tags(self): + test_strings = { + 'legal': 'tl:Event-context,' + '(Vehicle,Event), Animal-agent, Action, tl:Animal-agent, tl:Action', + 'multipleDesc': 'tl:Event-context,' + 'tl:Event-context,' + 'Vehicle,(Vehicle,tl:Event-context), Animal-agent, Action, tl:Animal-agent, tl:Action', + 'multipleDescIncShort': 'tl:Event-context,' + 'tl:Organizational-property/Event-context,' + ' Animal-agent, Action, tl:Animal-agent, tl:Action' + } + expected_results = { + 'legal': True, + 'multipleDesc': False, + 'multipleDescIncShort': False + } + expected_issues = { + 'legal': [], + 'multipleDesc': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, + tag_namespace='tl:Property/Organizational-property/Event-context'), + 'multipleDescIncShort': self.format_error(ValidationErrors.TAG_NOT_UNIQUE, + tag_namespace='tl:Property/Organizational-property/Event-context'), + } + self.validator_semantic(test_strings, expected_results, expected_issues, False) + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/validator/test_tag_validator_util.py b/tests/validator/test_tag_validator_util.py index 5da42d2e..81bb3bfb 100644 --- a/tests/validator/test_tag_validator_util.py +++ b/tests/validator/test_tag_validator_util.py @@ -54,10 +54,10 @@ def test_date_times(self): 'invalidString': 'not a time', } for string in valid_test_strings.values(): - result = class_util.is_date_time(string) + result = class_util.is_date_time_value_class(string) self.assertEqual(result, True, string) for string in invalid_test_strings.values(): - result = class_util.is_date_time(string) + result = class_util.is_date_time_value_class(string) self.assertEqual(result, False, string)