Skip to content

Commit

Permalink
1. limit transformers version
Browse files Browse the repository at this point in the history
2. dep fast default false
3. sdp mode default mix
  • Loading branch information
AlongWY committed Jul 23, 2021
1 parent 09ea4e7 commit 89cf785
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ltp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*_
# Author: Yunlong Feng <ylfeng@ir.hit.edu.cn>

__version__ = '4.1.5'
__version__ = '4.1.5.post2'

from . import const
from . import nn, utils
Expand Down
4 changes: 2 additions & 2 deletions ltp/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def srl(self, hidden: dict, keep_empty=True):
return srl_labels_res

@no_grad
def dep(self, hidden: dict, fast=True, as_tuple=True):
def dep(self, hidden: dict, fast=False, as_tuple=True):
"""
依存句法树
Args:
Expand Down Expand Up @@ -442,7 +442,7 @@ def dep(self, hidden: dict, fast=True, as_tuple=True):
]

@no_grad
def sdp(self, hidden: dict, mode: str = 'graph'):
def sdp(self, hidden: dict, mode: str = 'mix'):
"""
语义依存图(树)
Args:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]),
install_requires=[
"torch>=1.2.0",
"transformers>=4.0.0, <5.0",
"transformers>=4.0.0, <=4.7.0",
"pygtrie>=2.3.0, <2.5",
"packaging>=20.0"
],
Expand Down

0 comments on commit 89cf785

Please sign in to comment.