Skip to content

Commit d27ecdd

Browse files
committed
better documentation for causal relation identification
1 parent 2dae577 commit d27ecdd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/dackar/causal/RuleBasedMatcher.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,13 @@ def extractInformation(self):
8989
self._causalRelationGeneral = None
9090

9191
logger.info('End of health status extraction!')
92-
## causal relation
92+
## Extract causal relation
9393
logger.info('Start to extract causal relation using OPM model information')
9494
self.extractCausalRelDep(self._matchedSents)
9595
dfCausals = pd.DataFrame(self._extractedCausals, columns=self._causalNames)
9696
self._causalRelation = dfCausals
9797
dfCausals.to_csv(nlpConfig['files']['output_causal_effect_file'], columns=self._causalNames)
9898
logger.info('End of causal relation extraction!')
99-
## print extracted relation
100-
# logger.info('Start to use general extraction method to extract causal relation')
101-
# print(*self.extract(self._matchedSents, predSynonyms=self._causalKeywords['VERB'], exclPrepos=[]), sep='\n')
102-
# logger.info('End of causal relation extraction using general extraction method!')
10399

104100
# Extract general entity relations
105101
logger.info('Start to extract general entity relations')
@@ -110,7 +106,7 @@ def extractInformation(self):
110106
print(self._relationGeneral)
111107
logger.info('End of general entity relation extraction!')
112108

113-
# collect general cause effect info in (subj, causalKeywords, obj)
109+
# Collect general cause effect info in (subj, causalKeywords, obj), this can be combined with method "extractCausalRelDep"
114110
logger.info('Start to use general extraction method to extract causal relation')
115111
matchedCauseEffectSents = self.collectCauseEffectSents(self._doc)
116112
extractedCauseEffects = self.extract(matchedCauseEffectSents, predSynonyms=self._causalKeywords['VERB'], exclPrepos=[])

0 commit comments

Comments
 (0)