Opennyai: 适用于印度法律文件的高效 NLP 工作流
Opennyai is a python library for natural language preprocessing on Indian legal texts.
This library provides unified access to the following 3 pre-trained AI models developed by OpenNyAI which focus on Indian court judgments:
This library is mainly for running the pretrained models on your custom input judgments text. For more details about data and model training, please refer to individual git repo links.
Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | shCreate a virtual environment and install opennyai:
uv venv --python 3.13
source .venv/bin/activate
uv pip install opennyaiYou can also install with pip directly (requires Python >= 3.13):
python -m venv .venv
source .venv/bin/activate
pip install -U opennyaiIf you want to utilize spacy with GPU please install Cupy with the appropriate CUDA version:
pip install cupy-cuda12x # For CUDA 12.xIn case of any issue with installation please refer to spacy installation with cupy.
Please refer to the Documentation for more details.
To run the 3 OpenNyAI models on judgment texts of your choice please run following python code
…The output of each model is present in following keys of each element of the output
results[0][
'annotations'] ## shows the result of model at sentence level, each entry will have entities, rhetorical role, and other details
results[0]['summary'] ## shows Summary for each of the Rheorical Role for first judgment text For more details on usage please refer to the documentation
| Description | Link |
|---|---|
| Run Inference |
暂无开放 Issues,或尚未同步最近议题。