Skip to content

maastrichtlawtech/rechtspraak_citation_extraction

Repository files navigation

Rechtspraak citations

This library contains a function that aqcuires citation data for Rechtspraak cases using the LIDO.

Version

Python 3.9

Contributors

Cloud956
Piotr Lewandowski
shashankmc
shashankmc
gijsvd
gijsvd

How to install?

pip install rechtspraak_citations_extractor

What are the functions?

  • Rechtspraak Citations Extractor
    1. get_citations
    2. Gets all the data about case law citing/being cited and the legislations cited from the cases in passed on DataFrame of case metadata. Requires a valid DataFrame object with a column titled 'ecli'. Returns the same Dataframe object, with 3 additional columns containing JSON strings of citation information.
  • What are the parameters?

    1. get_citations(dataframe = None, username = '', password = '', threads = 2)
    2. Parameters:
      • dataframe: Pandas DataFrame object, required
      • A Dataframe object, which must have a column titled 'ecli'. The code extracts citations for each separate ECLI in the column. A Dataframe with Rechtspraak data can be aqcuired via the rechtspraak extractor - https://pypi.org/project/rechtspraak-extractor
        Default: None
      • username: string, required, default ''
      • The username that together with the password can be used to log into LIDO.
      • password: string, required, default ''
      • The password that together with the username can be used to log into LIDO.
      • threads: int, optional, default 1
      • Option for multi-threading of LiDO requests - not recommended to go above 2, as LiDO breaks connections when overwhelmed.

    Examples

    import rechtspraak_extractor as rex
    import rechtspraak_citations_extractor as rex_citations
    -----------------------------------------------------------------------------------------------------------------------
    
    # To get the rechtspraak data in a dataframe:
    df = rex.get_rechtspraak(max_ecli=100, sd='2022-08-01', save_file='y')  # Gets 100 ECLIs from 1st August 2022
    df = get_rechtspraak_metadata(save_file='n',dataframe=df)
    # To get the citations:
    df_with_citaitons = rex_citations.get_citations(df,'username','password')
    

    License

    License: Apache 2.0

    Previously under the MIT License, as of 28/10/2022 this work is licensed under a Apache License, Version 2.0.

    Apache License, Version 2.0
    
    Copyright (c) 2022 Maastricht Law & Tech Lab
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
        
        http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    

    About

    Python package to extract rechtspraak citations and associated metadata for given ECLIs

    Resources

    License

    Code of conduct

    Stars

    Watchers

    Forks

    Packages

    No packages published

    Languages