🚀 釋放深度學習在條款分類中的強大力量:變革商業應用
在商業運營的動態環境中,文檔處理的效率和準確性至關重要。傳統的法律條款和合同分析方法往往耗時且容易出現人為錯誤。然而,隨著深度學習技術的出現,特別是在條款分類領域,一個自動化和精確性的新時代已經來臨。
這是 “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 許可證。