| """查询分割 baseline —— 进程内函数版(无需启动本地服务)。 | |
| from qd_baselines import supervised_decompose, unsupervised_decompose, icl_decompose | |
| subs = icl_decompose("Who directed the highest-grossing film of 1997?") | |
| # -> ['What was the highest-grossing film of 1997?', 'Who directed it?'] | |
| 三个函数都惰性加载各自的模型/资源,首次调用才真正初始化。所需环境变量见 .env.example。 | |
| ④ SearChain 是「推理+检索」闭环(非纯分解器),仍为服务版,见 使用说明.md 第 4 节。 | |
| """ | |
| from ._supervised import supervised_decompose | |
| from ._unsupervised import unsupervised_decompose | |
| from ._icl import icl_decompose | |
| METHODS = { | |
| "supervised": supervised_decompose, | |
| "unsupervised": unsupervised_decompose, | |
| "icl": icl_decompose, | |
| } | |
| __all__ = [ | |
| "supervised_decompose", | |
| "unsupervised_decompose", | |
| "icl_decompose", | |
| "METHODS", | |
| ] | |