Skip to content

Commit 5bc5f87

Browse files
committed
change print to logger
1 parent 73bf5b2 commit 5bc5f87

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/dackar/causal/CausalSentence.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def extractInformation(self):
103103
if len(self._allRelPairs) > 0:
104104
self._relationGeneral = pd.DataFrame(self._allRelPairs, columns=self._relationNames)
105105
if self._screen:
106-
print(self._relationGeneral)
106+
logger.info(self._relationGeneral)
107107
logger.info('End of general entity relation extraction!')
108108

109109
# Collect general cause effect info in (subj, causalKeywords, obj), this can be combined with method "extractCausalRelDep"
@@ -426,7 +426,7 @@ def findHealthStatus(self, root, deps):
426426
toVisit = deque([root]) # queue for bfs
427427
while len(toVisit) > 0:
428428
child = toVisit.popleft()
429-
# print("child", child, child.dep_)
429+
# logger.debug("child", child, child.dep_)
430430
if child.dep_ in deps:
431431
# to handle preposition
432432
try:
@@ -672,11 +672,6 @@ def extractCausalRelDep(self, matchedSents):
672672
if len(causeEffectPair) != 0:
673673
allCauseEffectPairs.append(causeEffectPair)
674674

675-
# print("Identified Cause-Effect Pairs:")
676-
# for elem in allCauseEffectPairs:
677-
# for i in elem:
678-
# print(i)
679-
680675
def identifyCauseEffectForNsuj(self, cRoot, cEntsIndex, causalEnts, orderedEnts, validRightSSCEnts, reverse=False):
681676
"""
682677
Identify the cause effect pairs for nsubj

0 commit comments

Comments
 (0)