Twinkle HubTwinkle Hub

台灣法規內文·關鍵字檢索

tw_statute_search_text

法令沿革 · 11 件🇹🇼 台湾読み取り専用

關鍵字 / Keywords: 法條 全文搜尋 BM25 statute text search 條文 內文 關鍵字

Scope: Taiwan (ROC · 中華民國) statute full-text search only.

【EN keywords】Taiwan statute keyword search · full-text search over article body · BM25 ranking · Taiwan legal statute lookup by content · 中華民國 法條 全文檢索

【何時用】用戶只知概念/關鍵字·不知法規名或條號時 · 想找哪些台灣法條在講這件事。e.g.「哪條法規規範職業災害補償?」「個資外洩責任在哪條?」「哪條規定共有物分割?」

【Topics covered · descriptive keyword list】哪條法規 · 哪個法條 · keyword search 法規 · 全文檢索 · 條文內容 · 關鍵字找條文 · 法規內文 · 職災 · 個資 · 消保 · etc.

【不要一般常識答】不要憑印象說「應該是 X 法第 N 條」· 一律用本 tool 從全 corpus 拿真實 hit · 附 BM25 score。

BM25 relevance ranking over 35k 台灣法規現行版本條文·jieba tokenize·配合 law_name filter 可限縮到單一法規。

Args: query: Chinese/English text · 至少 2 字元 law_name: Optional filter · e.g. '民法' / '個資法' · 限縮到單一法規 limit: 1-50 · default 20

Returns: {found, query, n_hits, hits: [{law_name, pcode, article, article_suffix, score (BM25), text_excerpt (匹配詞 ± 100 chars)}, ...]}

パラメータ

名前説明
query *string
law_namestring
limitinteger
生の JSON schema
{
  "properties": {
    "query": {
      "title": "Query",
      "type": "string"
    },
    "law_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Law Name"
    },
    "limit": {
      "default": 20,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "tw_statute_search_textArguments",
  "type": "object"
}

呼び出し方

スターター——パラメータは​上表参照
tw_statute_search_text({ query: "…" })