Semantic Annotation for Process Models: - Department of Computer ...

Semantic Annotation for Process Models: - Department of Computer ... Semantic Annotation for Process Models: - Department of Computer ...

21.01.2014 Views

192 APPENDIX D. ALGORITHM FOR GOAL ANNOTATION Algorithm 3 Goal Annotation Algorithm for Case B.II Require: weight parameters γ, δ initialize value of weight f orarti f actonto, weight f orarti f actname as 0 Arraya f[] is a set of artifacts associated with av through has_Artifact for each a f in a f [] do onto = OD(a f) {OD(a f) gets the domain ontological concept annotated to a f } for each target artifact a f ′ of a g in goal ontology do r = SR(a f , onto) {SR(ar, onto) gets the semantic relationship between a f and onto} initialize σ, τ as 0 if onto equals a f ′ then if r is "same_as" then σ = 1 else if r is "kind_of" then σ = 0.8 else if r is "phase_of" then σ = 0.5 end if end if weight f orarti f actonto = weight f orarti f actonto+σ if a f .name equals a f ′ .name by string match then τ = 1 else if a f .name partly equals a f ′ .name by string match then τ = 0.5 end if weight f orarti f actname = weight f orarti f actname+τ end for end for return γ ∗ weight f orarti f actonto+ δ ∗ weight f orarti f actname

Algorithm 4 Goal Annotation Algorithm for Case B.III Require: weight parameters ɛ, µ initialize value of weight f oroutarti f actonto, weight f oroutarti f actname as 0 {Case B.III} Array oa f [] is a set of artifacts indirectly related to av through has_Output and related_Artifact for each a f in oa f[] do onto = OD(a f) {OD(a f) gets the domain ontological concept annotated to a f } for each target artifact a f ′ of a g in goal ontology do r = SR(a f , onto) {SR(av, onto) gets the semantic relationship between a f and onto} initialize σ, τ as 0 if onto equals a f ′ then if r is "same_as" then σ = 1 else if r is "kind_of" then σ = 0.8 else if r is "phase_of" then σ = 0.5 end if end if if state s ′ of a f ′ equals output o of av then weight f oroutarti f actonto = weight f oroutarti f actonto+σ + 1 else weight f oroutarti f actonto = weight f oroutarti f actonto+σ end if if a f .name equals a f ′ .name by string match then τ = 1 else if a f .name partly equals a f ′ .name by string match then τ = 0.5 end if if state s ′ of a f ′ equals output o of av then weight f oroutarti f actname = weight f oroutarti f actname +τ + 1 else weight f oroutarti f actname = weight f oroutarti f actname +τ end if end for end for return ɛ ∗ weight f oroutarti f actonto+ µ ∗ weight f oroutarti f actname 193

192 APPENDIX D. ALGORITHM FOR GOAL ANNOTATION<br />

Algorithm 3 Goal <strong>Annotation</strong> Algorithm <strong>for</strong> Case B.II<br />

Require: weight parameters γ, δ<br />

initialize value <strong>of</strong> weight f orarti f actonto, weight f orarti f actname as 0<br />

Arraya f[] is a set <strong>of</strong> artifacts associated with av through has_Artifact<br />

<strong>for</strong> each a f in a f [] do<br />

onto = OD(a f) {OD(a f) gets the domain ontological concept annotated to a f }<br />

<strong>for</strong> each target artifact a f ′ <strong>of</strong> a g in goal ontology do<br />

r = SR(a f , onto) {SR(ar, onto) gets the semantic relationship between a f and<br />

onto}<br />

initialize σ, τ as 0<br />

if onto equals a f ′ then<br />

if r is "same_as" then<br />

σ = 1<br />

else if r is "kind_<strong>of</strong>" then<br />

σ = 0.8<br />

else if r is "phase_<strong>of</strong>" then<br />

σ = 0.5<br />

end if<br />

end if<br />

weight f orarti f actonto = weight f orarti f actonto+σ<br />

if a f .name equals a f ′ .name by string match then<br />

τ = 1<br />

else if a f .name partly equals a f ′ .name by string match then<br />

τ = 0.5<br />

end if<br />

weight f orarti f actname = weight f orarti f actname+τ<br />

end <strong>for</strong><br />

end <strong>for</strong><br />

return γ ∗ weight f orarti f actonto+ δ ∗ weight f orarti f actname

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!