Blame view

requirements_hanlp.txt 447 Bytes
0536222c   tangwang   query parser优化
1
2
3
4
5
6
7
8
9
10
11
12
13
  # Optional: HanLP query tokenization for the main backend venv (QueryParser).
  #
  # Install:
  #   source activate.sh
  #   pip install -r requirements_hanlp.txt
  #
  # Why pin transformers<5:
  #   transformers 5.x no longer exposes `encode_plus` on `BertTokenizer`, but HanLP 2.1.x
  #   still calls it → AttributeError during `hanlp.load(...)`.
  #   Use transformers 4.44+ (4.x) which remains API-compatible with HanLP.
  
  hanlp>=2.1.0
  transformers>=4.44,<5