This commit is contained in:
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
#[allow(clippy::wildcard_imports)] // I use *-operator on purpose: I want to receive a compiler
|
||||
// warning if I've not updated my `create_classifier` function
|
||||
use crate::law::{self, responsible::*};
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
use log::{debug, info};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
pub fn contains_without_unter(classifier_name: &str, instance_name: &str) -> bool {
|
||||
instance_name
|
||||
.to_lowercase()
|
||||
|
16
src/lib.rs
16
src/lib.rs
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
pub mod config;
|
||||
pub mod misc;
|
||||
|
||||
|
16
src/main.rs
16
src/main.rs
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use clap::{command, Parser};
|
||||
|
16
src/misc.rs
16
src/misc.rs
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
use std::{fs, io, path::Path};
|
||||
|
||||
use time::{format_description, OffsetDateTime};
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
//! Deals with getting all paragraphs for a given law text
|
||||
|
||||
mod ris_structure;
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::Deserialize;
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
//! Deals with getting all paragraphs for a given law text
|
||||
mod parser;
|
||||
|
||||
|
@ -1,3 +1,19 @@
|
||||
// Copyright (C) 2024 Philipp Hofer
|
||||
//
|
||||
// Licensed under the EUPL, Version 1.2 or – as soon they will be approved by
|
||||
// the European Commission - subsequent versions of the EUPL (the "Licence").
|
||||
// You may not use this work except in compliance with the Licence.
|
||||
//
|
||||
// You should have received a copy of the European Union Public License along
|
||||
// with this program. If not, you may obtain a copy of the Licence at:
|
||||
// <https://joinup.ec.europa.eu/software/page/eupl>
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the Licence is distributed on an "AS IS" basis,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the Licence for the specific language governing permissions and
|
||||
// limitations under the Licence.
|
||||
|
||||
use roxmltree::Node;
|
||||
|
||||
use crate::{
|
||||
|
Reference in New Issue
Block a user