diff --git a/laws/abgb.toml b/laws/abgb.toml new file mode 100644 index 0000000..88e680e --- /dev/null +++ b/laws/abgb.toml @@ -0,0 +1,86 @@ +[law] +id = 10001622 +name = "ABGB" + +[[law.classifiers]] +name = "Theil" +is_root = true +match_function = "containsCaseSensitive" + +[[law.classifiers]] +name = "Abtheilung" +is_root = false +match_function = "contains" + +[[law.classifiers]] +name = "Hauptstück" +is_root = false +match_function = "contains" + +[[law.classifiers]] +name = "Abschnitt" +is_root = false +match_function = "contains" + +[[law.classifiers]] +name = "letter" +is_root = false +match_function = "starts_with_letter" + +[[law.classifiers]] +name = "roman numbering" +is_root = false +match_function = "starts_with_roman_number" + +[[law.classifiers]] +name = "numbering" +is_root = false +match_function = "starts_with_number" + +[[law.classifiers]] +name = "dash" +is_root = false +match_function = "starts_with_dash" + +[parser] +remove_strings = [ + "", + "", "", + "", "", + "", "", + """Zweyter Theil.""", # weird thing after § 858 +] + +[[parser.replace_rules]] +find = "Einleitung." # Should be at the same level as the other "Theil"e +replace_with = "Nullter Theil. Einleitung" + +[[parser.replace_rules]] +find = "" +replace_with = "-" + +[[parser.replace_rules]] +find = """Medizinische Behandlung""" +replace_with = """- Medizinische Behandlung""" + +[[parser.replace_rules]] +find = """Von den dinglichen Rechten.""" +replace_with = """Von den dinglichen Rechten.""" + +[[parser.replace_rules]] +find = """Erfordernisse zur Ersitzung:""" +replace_with = """I. Erfordernisse zur Ersitzung:""" + +# RIS uses multiple headers to get more attention... +[[parser.replace_rules]] +find = """Zweyter Theildesbürgerlichen Gesetzbuches.Von dem Sachenrechte.""" +replace_with = """Zweyter Theil des bürgerlichen Gesetzbuches: Von dem Sachenrechte.""" + +[[parser.replace_rules]] +find = """Erste Abtheilungdes Sachenrechtes.""" +replace_with = """Erste Abtheilung des Sachenrechtes.""" + +[[parser.replace_rules]] +find = """Dritter Theildesbürgerlichen Gesetzbuches.Von den gemeinschaftlichen Bestimmungen der Personen- und Sachenrechte.""" +replace_with = """Dritter Theil des bürgerlichen Gesetzbuches.Von den gemeinschaftlichen Bestimmungen der Personen- und Sachenrechte.""" + diff --git a/laws/stgb.toml b/laws/stgb.toml new file mode 100644 index 0000000..1cb46d3 --- /dev/null +++ b/laws/stgb.toml @@ -0,0 +1,43 @@ +[law] +id = 10002296 +name = "StGB" + +[[law.classifiers]] +name = "Teil" +is_root = true +match_function = "contains" + +[[law.classifiers]] +name = "Abschnitt" +is_root = false +match_function = "contains" + +[parser] +remove_strings = [ + "", "", + "", "", + "", "", + "", "", + """""" +] + +[[parser.replace_rules]] +find = """Erster Abschnitt""" +replace_with = """Erster Abschnitt""" + +[[parser.replace_rules]] +find = """Allgemeine Bestimmungen""" +replace_with = """Allgemeine Bestimmungen""" + +[[parser.replace_rules]] +find = """1. Verwertungsrechte.""" +replace_with = """1. Verwertungsrechte.""" + +[[parser.replace_rules]] +find = """Strafbare Handlungen gegen Leib und Leben""" +replace_with = """Strafbare Handlungen gegen Leib und Leben""" + +[[parser.replace_rules]] +find = "" +replace_with = "-" +