🚀 释放深度学习在条款分类中的强大力量:变革商业应用
在商业运营的动态环境中,文档处理的效率和准确性至关重要。传统的法律条款和合同分析方法往往耗时且容易出现人为错误。然而,随着深度学习技术的出现,特别是在条款分类领域,一个自动化和精确性的新时代已经来临。
这是 “google-bert/bert-base-cased” 的微调版本,用于分类任务,使用了从 Atticus 项目 [https://www.atticusprojectai.org/] 注释的合同中提取的 3200 多个条款示例。
通过像 ATTICUS 项目这样的举措以及人工智能的不断进步,商业文档分析的未来一片光明 —— 在这个未来中,深度学习将在从推动全球经济的海量文本信息中释放效率、洞察力和价值方面发挥关键作用。
🚀 快速开始
实际应用
在实践中,深度学习在条款分类中的应用涵盖了各个行业:
- 法律服务:律师事务所和法律部门利用深度学习来简化合同审查流程,并高效提取关键信息。
- 金融与保险:深度学习模型有助于分析复杂的金融协议,识别与风险因素、责任和合规性相关的条款。
- 医疗保健与制药:处于高度监管行业的公司使用深度学习来分析患者合同、供应商协议和监管文件。
测试准确率:88 %
标签如下:
- "0": "反转让条款"
- "1": "审计权条款"
- "2": "责任上限条款"
- "3": "不起诉承诺条款"
- "4": "生效日期条款"
- "5": "到期日期条款"
- "6": "适用法律条款"
- "7": "保险条款"
- "8": "许可授予条款"
- "9": "不可转让许可条款"
- "10": "终止/续约通知期条款"
- "11": "合同方条款"
- "12": "终止后服务条款"
- "13": "续约期限条款"
- "14": "收入/利润分享条款"
- "15": "无责任上限条款"
- "16": "保证期限条款"
📦 安装指南
要加载该模型,首先需要在你的环境中安装 transformers
库:
pip install transformers
💻 使用示例
基础用法
from transformers import pipeline
classifier = pipeline("text-classification", model="mauro/bert-base-uncased-finetuned-clause-type")
clause = """ The foregoing license shall be transferable or sublicensable by Parent Group solely
to a Permitted Party and subject to the restrictions herein with any sale or transfer of a
Parent business that utilizes the Licensed SpinCo IP If Parent enters an agreement to transfer
the License_Granted to it under this Section 3 1 in connection with any sale or transfer of a
Parent business then SpinCo and members of the SpinCo Group shall be made third party
beneficiaries under such transfer agreement to enforce breaches of the license
3 If SpinCo enters an agreement to transfer the License_Granted to it under this
Section 3 2 in connection with any sale or transfer of a SpinCo business then Parent
and members of the Parent Group shall be made third party beneficiaries under such transfer
agreement to enforce breaches of the license Such agreement shall prohibit any further
sublicensing or transfer of rights by the Permitted Party or in the case of a sale or
transfer of a Parent business the transferee or any use of the Licensed SpinCo IP outside
the scope of the License_Granted to Parent herein Such agreement shall prohibit any further
transfer of rights by such party or any use of the transferred Intellectual Property outside the
scope of the License_Granted to SpinCo herein"""
result = classifier(clause, return_all_scores=False)
print(result)
运行上述代码,结果将是:
[{'label': 'Non-Transferable_License', 'score': 0.989809513092041}]
高级用法
如果你想可视化所有类别的概率分布,需要安装 matplotlib
和 pandas
:
pip install matplotlib pandas
import pandas as pd
import matplotlib.pyplot as plt
preds = classifier(clause, return_all_scores=True)
df = pd.DataFrame([[x['label'], x['score']] for x in preds[0]], columns=['label', 'score'])
plt.bar(df['label'], df['score'])
plt.xlabel('label')
plt.ylabel('score')
plt.title('所有条款类型的概率分布')
plt.xticks(rotation=90)
plt.show()
运行上述代码后,你将得到所有类别的概率分布可视化结果:

📄 许可证
本项目采用 Apache-2.0 许可证。