1 Star 0 Fork 51

Geoffrey.Lao / DDParser

forked from 百度开源 / DDParser 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

DDParser

PyPi Latest Release License

依存句法分析简介

依存句法分析是自然语言处理核心技术之一,旨在通过分析句子中词语之间的依存关系来确定句子的句法结构,如下图实例所示: struct
依存句法分析作为底层技术,可直接用于提升其他NLP任务的效果,这些任务包括但不限于语义角色标注、语义匹配、事件抽取等。该技术具有很高的研究价值及应用价值。为了方便研究人员和商业合作伙伴共享效果领先的依存句法分析技术,我们开源了基于大规模标注数据训练的高性能的依存句法分析工具,并提供一键式安装及预测服务,用户只需一条命令即可获取依存句法分析结果。

项目介绍

DDParser(Baidu Dependency Parser)是百度自然语言处理部基于深度学习平台飞桨(PaddlePaddle)和大规模标注数据研发的依存句法分析工具。其训练数据不仅覆盖了多种输入形式的数据,如键盘输入query、语音输入query,还覆盖了多种场景的数据,如新闻、论坛。该工具在随机评测数据上取得了优异的效果。同时,该工具使用简单,一键完成安装及预测。

效果说明

数据集 UAS LAS
CTB5 90.31% 89.06%
DuCTB1.0 94.80% 92.88%
  • CTB5: Chinese Treebank 5.0 是Linguistic Data Consortium (LDC)在2005年发布的中文句法树库,包含18,782条句子,语料主要来自新闻和杂志,如新华社日报。
  • DuCTB1.0: Baidu Chinese Treebank1.0是百度构建的中文句法树库,即本次所发布的依存句法分析工具-DDParser的训练数据来源,具体信息参见数据来源

注:由于CTB5数据集规模较小,最优模型(即评测模型)使用了句子的word级表示、POS(词性标签)表示、以及预训练词向量,而DuCTB1.0数据集规模较大,其最优模型仅使用了句子的word级和char级表示。

快速开始

版本依赖


一键安装

用户可以使用以下方式进行一键安装及预测:

功能使用

未分词方式

  • 代码示例
>>> from ddparser import DDParser
>>> ddp = DDParser()
>>> # 单条句子
>>> ddp.parse("百度是一家高科技公司")
[{'word': ['百度', '是', '一家', '高科技', '公司'], 'head': [2, 0, 5, 5, 2], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB']}]
>>> # 多条句子
>>> ddp.parse(["百度是一家高科技公司", "他送了一本书"])
[{'word': ['百度', '是', '一家', '高科技', '公司'], 'head': [2, 0, 5, 5, 2], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB']}, 
{'word': ['他', '送', '了', '一本', '书'], 'head': [2, 0, 2, 5, 2], 'deprel': ['SBV', 'HED', 'MT', 'ATT', 'VOB']}]
>>> # 输出概率和词性标签
>>> ddp = DDParser(prob=True, use_pos=True)
>>> ddp.parse(["百度是一家高科技公司"])
[{'word': ['百度', '是', '一家', '高科技', '公司'], 'postag': ['ORG', 'v', 'm', 'n', 'n'], 'head': [2, 0, 5, 5, 2], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB'], 'prob': [1.0, 1.0, 1.0, 1.0, 1.0]}]
>>> # buckets=True, 数据集长度不均时处理速度更快
>>> ddp = DDParser(buckets=True)
>>> # 选择使用transformer模型
>>> ddp = DDParser(encoding_model='transformer')
>>> # 使用GPU
>>> ddp = DDParser(use_cuda=True)

已分词方式

  • 代码示例
>>> from ddparser import DDParser
>>> ddp = DDParser()
>>> ddp.parse_seg([['百度', '是', '一家', '高科技', '公司'], ['他', '送', '了', '一本', '书']])
[{'word': ['百度', '是', '一家', '高科技', '公司'], 'head': [2, 0, 5, 5, 2], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB']}, 
{'word': ['他', '送', '了', '一本', '书'], 'head': [2, 0, 2, 5, 2], 'deprel': ['SBV', 'HED', 'MT', 'ATT', 'VOB']}]
>>> # 输出概率
>>> ddp = DDParser(prob=True)
>>> ddp.parse_seg([['百度', '是', '一家', '高科技', '公司']])
[{'word': ['百度', '是', '一家', '高科技', '公司'], 'head': [2, 0, 5, 5, 2], 'deprel': ['SBV', 'HED', 'ATT', 'ATT', 'VOB'], 'prob': [1.0, 1.0, 1.0, 1.0, 1.0]}]

注:标签含义见依存句法分析标注关系集合

进阶使用

项目下载

用户可以通过git clone https://github.com/baidu/DDParser下载源码,并且执行下列命令安装依赖库:

pip install --upgrade paddlepaddle-gpu
pip install --upgrade LAC

模型下载

我们发布了基于DuCTB1.0训练的模型,通过执行cd ddparser && sh download_pretrained_model.sh下载模型,模型将保存在./ddparser/model_files/baidu下。

训练

用户可以通过sh run_train.sh训练模型。详细命令如下所示:

CUDA_VISIBLE_DEVICES=0 python -u run.py \
        --mode=train \
        --use_cuda \
        --feat=char \
        --preprocess \
        --model_files=model_files/baidu \
        --model_files=model_files/baidu \
        --train_data_path=data/baidu/train.txt \
        --valid_data_path=data/baidu/dev.txt \
        --test_data_path=data/baidu/test.txt \
        --unk=UNK \
        --buckets=15

注:用户可通过修改train_data_path, valid_data_pathtest_data_path指定训练集,评估集和测试集, 参数含义见参数说明,所用数据集格式见数据格式说明

评估

用户可以通过执行sh download_data.sh下载我们提供的评估集,其将保存在./data/baidu/下。该评估集共2,592条句子,平均长度为11.27字符。
用户可以通过执行sh run_evaluate.sh评估模型效果,详细命令如下所示:

CUDA_VISIBLE_DEVICES=0 python run.py \
                                --mode=evaluate \
                                --use_cuda \
                                --model_files=model_files/baidu \
                                --test_data_path=data/baidu/test.txt \
                                --buckets=15 \
                                --tree

注:用户可通过修改test_data_path指定评估集,所用数据集格式见数据格式说明

预测

基于源码,我们提供两种基于命令行的预测方法,分别用于已分词数据和未分词数据。

基于已分词数据的预测

预测的输入数据要求以CoNLL-X(官方说明)格式组织,缺失字段使用“-”代替。通过执行sh run_predict.sh进行预测,详细命令如下所示:

CUDA_VISIBLE_DEVICES=0 python run.py \
                                --mode=predict \
                                --use_cuda \
                                --model_files=model_files/baidu \
                                --infer_data_path=data/baidu/test.txt \
                                --infer_result_path=data/baidu/test.predict \
                                --buckets=15 \
                                --tree 

注:用户可通过修改infer_data_pathinfer_result_path指定要预测的数据集和预测结果的路径。

基于未分词数据的预测
预测的输入数据为字符串形式,一行一条数据。通过执行sh run_predict_query.sh对来自标准输入的数据进行预测,详细命令如下所示:

CUDA_VISIBLE_DEVICES=0 python run.py \
                                --mode=predict_q \
                                --use_cuda \
                                --model_files=model_files/baidu \
                                --buckets=15 \
                                --tree

注:默认调用LAC预测分词和词性

参数说明

mode: 任务模式(train, evaluate, predict, predict_q)
config_path:保存超参文件的路径
model_files:保存模型的路径
train_data_path:训练集文件的路径
valid_data_path:验证集文件的路径
test_data_path:测试集文件的路径
infer_data_path:待预测文件的路径
pretrained_embedding_dir:预训练词向量的路径
batch_size:批尺寸
log_path:日志的路径
log_level: 日志等级,默认INFO('DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL')
infer_result_path:预测结果保存的路径
use_cuda:如果设置,则使用GPU
preprocess:训练模式下的使用参数,设置表示会基于训练数据进行词统计等操作,不设置默认使用已统计好的信息(节省统计时间);针对同一训练数据,多次训练可不设置该参数。
seed:随机数种子(默认:1)
threads:控制每个paddle实例的线程数
tree:确保输出结果是正确的依存句法树
prob:如果设置,则输出每个弧的概率,保存在结果的PROB列。
feat:选择输入的特征(char,pos)
buckets:选择最大分桶数(默认:15)
punct:评估结果的时候是否包含标点
unk:指定在预训练词表中UNK符号
encoding_model:选择底层模型, 默认lstm(lstm, transformer)

数据格式说明

本项目数据格式基于CoNLL-X(官方说明)的风格,缺少的字段使用"-"代替(用户只用关注ID,FROM,HEAD,DEPREL,PROB等列即可),如“百度是一家高科技公司”的可解析为如下格式:

ID      FROM   LEMMA CPOSTAG POSTAG  FEATS   HEAD    DEPREL   PROB   PDEPREL
1       百度    百度    -       -       -       2       SBV     1.0     -
2       是      是      -       -       -       0       HED     1.0     -
3       一家    一家    -       -       -       5       ATT     1.0     -
4       高科技  高科技  -       -       -       5       ATT     1.0     -
5       公司    公司    -       -       -       2       VOB     1.0     -

数据集介绍

依存句法分析标注关系集合

DuCTB1.0数据集含14种标注关系,具体含义见下表:

Label 关系类型 说明 示例
SBV 主谓关系 主语与谓词间的关系 他送了一本书(他<--送)
VOB 动宾关系 宾语与谓词间的关系 他送了一本书(送-->书)
POB 介宾关系 介词与宾语间的关系 我把书卖了(把-->书)
ADV 状中关系 状语与中心词间的关系 我昨天买书了(昨天<--买)
CMP 动补关系 补语与中心词间的关系 我都吃完了(吃-->完)
ATT 定中关系 定语与中心词间的关系 他送了一本书(一本<--书)
F 方位关系 方位词与中心词的关系 在公园里玩耍(公园-->里)
COO 并列关系 同类型词语间关系 叔叔阿姨(叔叔-->阿姨)
DBL 兼语结构 主谓短语做宾语的结构 他请我吃饭(请-->我,请-->吃饭)
DOB 双宾语结构 谓语后出现两个宾语 他送我一本书(送-->我,送-->书)
VV 连谓结构 同主语的多个谓词间关系 他外出吃饭(外出-->吃饭)
IC 子句结构 两个结构独立或关联的单句 你好,书店怎么走?(你好<--走)
MT 虚词成分 虚词与中心词间的关系 他送了一本书(送-->了)
HED 核心关系 指整个句子的核心

数据来源

DuCTB1.0:Baidu Chinese Treebank 1.0是百度构建的中文依存句法树库,包含近100万句子(本次发布模型的训练数据近53万句)。语料来自搜索query、网页句子,覆盖了手写、语音等多种输入形式,同时覆盖了新闻、论坛等多种场景。

文件结构

.
├── LICENSE
├── README.md
├── requirements.txt   #依赖模块及版本要求
├── ddparser           #DDParser的核心代码,包含模型,测试数据,运行脚本等

后期计划

  • 蒸馏模型,减小模型体积

参考资料

本项目所用方法出自论文《Deep Biaffine Attention for Neural Dependency Parsing》,对应的pytorch版本参见yzhangcs/parser

文献引用

如果您的学术工作成果中使用了DDParser,请您增加下述引用。我们非常欣慰DDParser能够对您的学术工作带来帮助。

@misc{zhang2020practical,
    title={A Practical Chinese Dependency Parser Based on A Large-scale Dataset},
    author={Shuai Zhang and Lijie Wang and Ke Sun and Xinyan Xiao},
    year={2020},
    eprint={2009.00901},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

如何贡献

我们欢迎开发者向DDParser贡献代码。如果您开发了新功能或发现了bug,欢迎给我们提交PR。

Copyright (c) 2020 Baidu, Inc. All Rights Reserved Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2020 Baidu, Inc. All Rights Reserved. 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. MIT License Copyright (c) 2020 張宇 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS

简介

百度开源的依存句法分析系统 展开 收起
Python
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/sie_lao668/DDParser.git
git@gitee.com:sie_lao668/DDParser.git
sie_lao668
DDParser
DDParser
master

搜索帮助