move 'overview' code (getting paragraphs of law text) into lib
All checks were successful
CI/CD Pipeline / test (push) Successful in 36s

This commit is contained in:
2024-02-04 21:15:15 +01:00
parent 0407a8bfbd
commit ab21651a87
9 changed files with 81 additions and 74 deletions

View File

@ -1,4 +1,5 @@
use log::{debug, info};
use risp::risparser::overview::parse;
use serde::{Deserialize, Serialize};
use std::{
cell::RefCell,
@ -7,7 +8,7 @@ use std::{
sync::Arc,
};
use crate::{overview, par};
use crate::par;
use self::responsible::{
contains, contains_at_start, contains_without_unter, starts_with_letter, starts_with_number,
@ -239,7 +240,7 @@ impl LawBuilder {
history: Vec::new(),
};
let paragraphs = overview::parse(law_id.unwrap()).unwrap();
let paragraphs = parse(law_id.unwrap()).unwrap();
for paragraph in tqdm::tqdm(paragraphs.into_iter()) {
let cont = par::parse(&paragraph, &mut builder).unwrap();