src.dackar.workflows.WorkflowManager

Created on August 1, 2025 @author: wangc, mandd

Attributes

NERMapping

customPipe

logger

Classes

WorkflowManager

Workflow Manager

Module Contents

src.dackar.workflows.WorkflowManager.NERMapping[source]
src.dackar.workflows.WorkflowManager.customPipe[source]
src.dackar.workflows.WorkflowManager.logger[source]
class src.dackar.workflows.WorkflowManager.WorkflowManager(config)[source]

Workflow Manager

_nlpConfig = None[source]
_neo4jConfig = None[source]
_config[source]
initializeNLP()[source]

Initialize NLP calculation

initializeNeo4j()[source]

Initialize NEO4j settings

runNLP()[source]

Execute the knowledge extraction

Parameters:

doc (str) – raw text data to process

runNeo4j()[source]

Load data into neo4j

run()[source]

Execute the workflow

write(data, fname, style='csv')[source]

Dump data

Parameters:
  • data (pandas.DataFrame) – output data to dump

  • fname (str) – file name to save the data

  • style (str, optional) – type of file. Defaults to ‘csv’.

visualize(doc)[source]

visual entities

Parameters:

doc (spacy.tokens.doc.Doc) – the processed document using nlp pipelines

reset()[source]
_validate(config)[source]

validate dackar input file using JSON schema

Parameters:

config (dict) – dictionary for dackar input

Raises:

IOError – error out if not valid

generatePattern(config)[source]

Generate patterns using provided OPM and/or entity file

Parameters:

config (dict) – input dictionary

Returns:

list of patterns will be used by entity matcher

Return type:

list

processCausalEnt()[source]

Parse causal keywords, and generate patterns for them The patterns can be used to identify the causal relationships

Returns:

list of patterns will be used by causal entity matcher

Return type:

list

preprocessing()[source]

setup text pre-processing pipeline

Raises:

IOError – if pipeline option is not available

Returns:

Preprocessing pipeline

Return type:

Preprocessing Object

ner()[source]

Set up NER pipelines

Raises:

NER Object – Object to conduct NER

causal()[source]

Set up causal analysis flow

Returns:

Object to conduct causal analysis

Return type:

Workflow Object