use crate::lexicon::Sort;
include!(concat!(env!("OUT_DIR"), "/ontology_data.rs"));
pub fn find_bridging_wholes(part_noun: &str) -> Option<&'static [&'static str]> {
let wholes = get_possible_wholes(&part_noun.to_lowercase());
if wholes.is_empty() {
None
} else {
Some(wholes)
}
}
pub fn check_sort_compatibility(predicate: &str, subject_sort: Sort) -> bool {
match get_predicate_sort(&predicate.to_lowercase()) {
Some(required) => subject_sort.is_compatible_with(required),
None => true,
}
}
pub fn required_sort(predicate: &str) -> Option<Sort> {
get_predicate_sort(&predicate.to_lowercase())
}