# Causal Pathway Extraction from Web-Board Documents
## 4 System Overview
### Implicit-Mediator Indication and Representation with Explicit-Mediators
b = 1; idd = 1; f1 = 0; f2 = 0; f3 = 0;
22: while b \(\leq\) num1 \(\land\) f1 = 0 do /*find an explicit mediator: C+ mediator(s)(CEpairid...)+E from ExplicitPath. 23: [\({}_{6}\) while idI \(\leq\)ExplicitPath[\({}_{\beta}\)].numberOfcauseEffectConceptPairs \(\wedge\)f3=0 do
24: [\({}_{7}\) If C = ExplicitPath[\({}_{\beta}\)].Get(CEpairid).wccidd then f2 = 1
25: elseif(E=ExplicitPath[\({}_{\beta}\)].Get(CEpairid).wccid+1)\(\land\)f2 = 1 then
26: If f2 = 1/f3 = 1 then (fill[\({}_{\beta}\)]=ExplicitPath[\({}_{\beta}\)].Get(CEpairid); id++);
27: [id++] ]; /* fill contains C+ mediator(s)(CEpairid...)+E. 28: [id++] ]; /* no E in fill. 29: [id = 1; ExplicitPath[\({}_{\alpha}\)].addAll(fill); check2 = 1];
30: /* add fill to ExplicitPath. 31:Id = 1; b++ ] ] /* else. ImplicitPath[\({}_{\alpha}\)].Get(CEpairid).contain(**) = false \(\land\) check2 = 1 then {ExplicitPath[\({}_{\alpha}\)].add(ImplicitPath[\({}_{\alpha}\)].Get(CEpairid))}
32:id++ ]```
30: If check2 = 1 then {ImplicitPath\({}_{[4]}\),clear(); check2 = 0 } | 3 | 2
31: For (\(\alpha\) = 1 to num1; \(\alpha\)++ ) /* check ImplicitPath being empty. 32: [If ImplicitPath\({}_{[4]}\) isNotEmpty then check2 = 1 ];
33: If check2 = 0 then check1 = 1;
34: \(\mathrm{l}_{1}\); ExplicitPath.sortRowOfArrayOfArrayList;
35: ExplicitPath.removeDuplicateRow;
36: |Return ExplicitPath
```

The implicit mediator indication and representation on PathWays with the explicit mediators from ExplicitPath/the ExplicitCEpairWithCErelPathways template is based on the following steps of the ExplicitCausalPathwayRepresentation algorithm (Algorithm 2):

1. Determine TransCEPair from all correct extracted causal pathways (Pathways\({}_{[\alpha]}\); \(\alpha\) = 1, 2, \(\ldots\), \(a\)). 2. Use TransCEPair to indicate \(\mathrm{CEpair}_{i}\) having the implicit mediator as the causal transitivity on Pathways\({}_{[\alpha]}\); if Pathways\({}_{[\alpha]}\) contains \(\mathrm{CEpair}_{i}\)\(\oplus\) TransCEPair (where \(i\) = 1, 2, \(\ldots\), \(\mathit{numOf}\)/\(\mathit{CauseEffectConceptPairs}\)), Pathways\({}_{[\alpha]}\) is the explicit- mediator causal pathway; and is added to \(\mathrm{ExplicitPath}_{[\alpha]}\). 3. If Pathways\({}_{[\alpha]}\).CEpair\({}_{i}\)\(\in\)TransCEPair, we mark \"\(\mathrm{on}\)\(\mathrm{CEpair}_{i}\) having causal transitivity or the implicit mediator, add \"\(\mathrm{CEpair}_{i}\) and subsequent \(\mathrm{CEpair}_{i+1}\), \(\mathrm{CEpair}_{i+2}\), \(\ldots\), \(\mathrm{CEpair}_{\mathit{numOf}}\)/\(\mathit{CauseEffectConceptPairs}\) of Pathways\({}_{[\alpha]}\) to \(\mathrm{ImplicitPath}_{[\alpha]}\), and add \(\mathrm{CEpair}_{i}\), \(\mathrm{CEpair}_{i}\)\(\ldots\)\(\mathrm{CEpair}_{i-1}\) of Pathways\({}_{[\alpha]}\) to \(\mathrm{ExplicitPath}_{[\alpha]}\). 4. Replace \"\(\mathrm{CEpair}_{i}\) with the explicit mediator(s) of \(\mathrm{CEpair}_{idd}\) from ExplicitPath as shown in Algorithm 2. 5. Check the ExplicitPath result from the ExplicitCausalPathwayRepresentation algorithm does not contain the implicit-mediator(s)/the causal transitivity by comparing trsvSet (line no. 5 of Algorithm 2) to TransCEPair determined from the ExplicitPath result on line no. 35 of Algorithm 2. If the TransCEPair determination from ExplicitPath is the same as trsvSet, ExplicitPath contains the explicit- mediator causal pathways without the causal transitivity or the implicit mediator, otherwise the ExplicitCausalPathwayRepresentation algorithm is re-executed after copying ExplicitPath to Pathways of Algorithm 2 and then setting ExplicitPath to empty. Therefore, the representation of the correct extracted causal pathways with the explicit mediators by Algorithm 2 is shown in Figure 7.

## 5 Evaluation and Discussion

The test corpus of 4000 EDUs employed to evaluate the proposed methodology for the causal pathway extraction through determining wrdCoc pairs having CErel is collected from the downloaded disease documents on Thai hospital web-boards.