This commit is contained in:
parent
4cc684ea91
commit
d0ba9f53db
@ -4,8 +4,14 @@ id = 10001622
|
||||
[[law.classifiers]]
|
||||
name = "Theil"
|
||||
is_root = true
|
||||
#match_function = "containsCaseSensitive"
|
||||
match_function = "contains"
|
||||
|
||||
#[[law.classifiers]]
|
||||
#name = "Abtheilung"
|
||||
#is_root = false
|
||||
#match_function = "contains"
|
||||
|
||||
[[law.classifiers]]
|
||||
name = "Hauptstück"
|
||||
is_root = false
|
||||
|
@ -12,6 +12,7 @@ use crate::paragraph::Parser;
|
||||
fn create_classifier(match_function: &str) -> Result<ClassifierApplicable, Error> {
|
||||
let func: ClassifierApplicable = match match_function {
|
||||
"contains" => Arc::new(contains),
|
||||
"containsCaseSensitive" => Arc::new(contains_case_sensitive),
|
||||
"starts_with_roman_number" => Arc::new(starts_with_roman_number),
|
||||
"contains_at_start" => Arc::new(contains_at_start),
|
||||
"starts_with_number" => Arc::new(starts_with_number),
|
||||
|
@ -11,6 +11,10 @@ pub fn contains(classifier_name: &str, instance_name: &str) -> bool {
|
||||
.contains(&classifier_name.to_lowercase())
|
||||
}
|
||||
|
||||
pub fn contains_case_sensitive(classifier_name: &str, instance_name: &str) -> bool {
|
||||
instance_name.contains(&classifier_name)
|
||||
}
|
||||
|
||||
pub fn starts_with_roman_number(_: &str, s: &str) -> bool {
|
||||
// Define the prefixes for Roman numerals.
|
||||
let roman_prefixes = [
|
||||
|
Loading…
Reference in New Issue
Block a user