<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          inaka-sheldonErlang 拼寫檢查器

          聯(lián)合創(chuàng)作 · 2023-09-30 16:02

          Sheldon 是一個非常簡單的 Erlang 拼寫檢查器。當某些單詞拼寫錯誤時,Sheldon會建議正確的單詞。該功能的靈感來自 Elixir 項目拼寫檢查。

          安裝

          注意 sheldon僅適用于 Erlang 21 或更高版本

          1. 克隆倉庫
          2. rebar3 compile

          用法

          Erlang Shell

          首先 Sheldon 是一個應(yīng)用程序,需要啟動??梢允褂?code>rebar3 shell來設(shè)置必要的路徑,然后使用sheldon:start/0application:ensure_all_started(sheldon)來啟動 Sheldon,但如果使用 Sheldon 作為依賴項,也可以讓 OTP 從 your_app.app 文件中啟動它。

          Sheldon 只有兩個主要方法,sheldon:check/1sheldon:check/2. 作為用戶只需要使用這些。

          1> sheldon:check("I want to check this correct text").
          ok
          2> sheldon:check("I want to check this misspeled text").
          #{bazinga => <<"That's no reason to cry. One cries because one is sad. For example, I cry because others are stupid, and that ma"...>>,
            misspelled_words => [#{candidates => ["misspeed","misspelled"],
               line_number => 1,
               word => "misspeled"}]}
          

          配置

          sheldon:check/2工作原理與sheldon:check/1類似,但它接受配置參數(shù)。使用此 Conf 參數(shù),我們可以對要檢查的文本應(yīng)用一些規(guī)則。這些規(guī)則是忽略單詞、忽略模式和忽略塊。

          這是格式:

          #{ ignore_words    => [string()]
           , ignore_patterns => [regex()]
           , ignore_blocks   => [ignore_block()]
           , adapters        => [adapter()]
           }.
          

          依賴關(guān)系

          • Erlang/OTP 23+

           

          瀏覽 20
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产高清无码免费 | 日韩一级精品无码毛片 | 亚洲日韩在线视频 | 亚洲成人精品 | 女人18片毛片60分钟黃菲菲 |