src.dackar.workflows.WorkOrderProcessing

Created on March, 2024

@author: wangc, mandd

Attributes

logger

Classes

WorkOrderProcessing

Class to process CWS work order dataset

Module Contents

src.dackar.workflows.WorkOrderProcessing.logger[source]
class src.dackar.workflows.WorkOrderProcessing.WorkOrderProcessing(nlp, entID='SSC', *args, **kwargs)[source]

Bases: src.dackar.workflows.WorkflowBase.WorkflowBase

Class to process CWS work order dataset

_allRelPairs = [][source]
_relationNames = ['Subj_Entity', 'Relation', 'Obj_Entity'][source]
reset()[source]

Reset rule-based matcher

addKeywords(keywords, ktype)[source]

Method to update self._causalKeywords or self._statusKeywords

Parameters:
  • keywords – dict, keywords that will be add to self._causalKeywords or self._statusKeywords

  • ktype – string, either ‘status’ or ‘causal’

extractInformation()[source]

extract information

Parameters:

None

Returns:

None

extractHealthStatus(matchedSents, predSynonyms=[], exclPrepos=[])[source]

Extract health status and relation

Parameters:
  • matchedSents – list, the matched sentences

  • predSynonyms – list, predicate synonyms

  • exclPrepos – list, exclude the prepositions

extractRelDep(matchedSents)[source]
Parameters:

matchedSents – list, the list of matched sentences

Returns:

generator, the extracted causal relation

Return type:

(subject tuple, predicate, object tuple)