src.dackar.causal.CausalPhrase ============================== .. py:module:: src.dackar.causal.CausalPhrase .. autoapi-nested-parse:: Created on March, 2024 @author: wangc, mandd Attributes ---------- .. autoapisummary:: src.dackar.causal.CausalPhrase.logger Classes ------- .. autoapisummary:: src.dackar.causal.CausalPhrase.CausalPhrase Module Contents --------------- .. py:data:: logger .. py:class:: CausalPhrase(nlp, entID='SSC', causalKeywordID='causal', *args, **kwargs) Bases: :py:obj:`src.dackar.causal.CausalBase.CausalBase` Class to process short phrase dataset .. py:method:: reset() Reset rule-based matcher .. py:method:: addKeywords(keywords, ktype) Method to update self._causalKeywords or self._statusKeywords :param keywords: dict, keywords that will be add to self._causalKeywords or self._statusKeywords :param ktype: string, either 'status' or 'causal' .. py:method:: extractInformation() extract information :param None: :returns: None .. py:method:: extractHealthStatus(matchedSents, predSynonyms=[], exclPrepos=[]) Extract health status and relation :param matchedSents: list, the matched sentences :param predSynonyms: list, predicate synonyms :param exclPrepos: list, exclude the prepositions