318 |
318 |
319 val empty_state = {access_G = Graph.empty, dirty = SOME []} |
319 val empty_state = {access_G = Graph.empty, dirty = SOME []} |
320 |
320 |
321 local |
321 local |
322 |
322 |
323 val version = "*** MaSh version 20130112a ***" |
323 val version = "*** MaSh version 20130113a ***" |
324 |
324 |
325 exception Too_New of unit |
325 exception Too_New of unit |
326 |
326 |
327 fun extract_node line = |
327 fun extract_node line = |
328 case space_explode ":" line of |
328 case space_explode ":" line of |
481 in |
481 in |
482 facts |> map (`weight_of) |> sort (int_ord o swap o pairself fst) |
482 facts |> map (`weight_of) |> sort (int_ord o swap o pairself fst) |
483 |> map snd |> take max_facts |
483 |> map snd |> take max_facts |
484 end |
484 end |
485 |
485 |
486 fun thy_feature_of s = ("y" ^ s, 2.0 (* FUDGE *)) |
486 fun thy_feature_of s = ("y" ^ s, 8.0 (* FUDGE *)) |
487 fun const_feature_of s = ("c" ^ s, 16.0 (* FUDGE *)) |
487 fun const_feature_of s = ("c" ^ s, 32.0 (* FUDGE *)) |
488 fun free_feature_of s = ("f" ^ s, 20.0 (* FUDGE *)) |
488 fun free_feature_of s = ("f" ^ s, 40.0 (* FUDGE *)) |
489 fun type_feature_of s = ("t" ^ s, 2.0 (* FUDGE *)) |
489 fun type_feature_of s = ("t" ^ s, 4.0 (* FUDGE *)) |
490 fun class_feature_of s = ("s" ^ s, 1.0 (* FUDGE *)) |
490 fun class_feature_of s = ("s" ^ s, 1.0 (* FUDGE *)) |
491 fun status_feature_of status = (string_of_status status, 2.0 (* FUDGE *)) |
491 fun status_feature_of status = (string_of_status status, 2.0 (* FUDGE *)) |
492 val local_feature = ("local", 8.0 (* FUDGE *)) |
492 val local_feature = ("local", 8.0 (* FUDGE *)) |
493 val lams_feature = ("lams", 2.0 (* FUDGE *)) |
493 val lams_feature = ("lams", 2.0 (* FUDGE *)) |
494 val skos_feature = ("skos", 2.0 (* FUDGE *)) |
494 val skos_feature = ("skos", 2.0 (* FUDGE *)) |