Research Article
Using Data Crawlers and Semantic Web to Build Financial XBRL Data Generators: The SONAR Extension Approach
Algorithm 2
Affinity algorithm.
AFFINITY*(R, C) { | Number affinity = 0; | For each tuple “TUPLE<attribute, literal>” of the row “R” { | For each of the semantic annotations “L” of the class “C” { | If (“L” == “attribute”) then { | return ; | } | } | For each semantic annotations of class datatype properties “L”{ | affinity = Levenshtein(“L”, “attribute”) + affinity; | } | } | return affinity; | } |
|