Code Monkey home page Code Monkey logo

Comments (6)

yumetodo avatar yumetodo commented on September 24, 2024

textlint-rule-ja-no-abusageをforkして書き換えてcommitしてどこかへpushしておき、npmでinstallするときにgitから引っ張ってくればいいかと思われます。

from textlint-rule-ja-no-abusage.

azu avatar azu commented on September 24, 2024

dict/prh.yml の辞書(正規表現ベース)の方はtextlint-rule-prhというルールで、辞書だけ外部管理できるようになっています。
しかし、dictionary.jsの方は、このルールを書くためにとりあえずで作った感じの仕組みであるため、textlint-rule-prhルールのように辞書を外部管理する仕組み(ルール)が今の所ないですね。

textlint-rule-ja-no-abusageをforkして辞書だけ変えたルールを作成するか、
辞書部分(dictionary.js)相当を外部管理できる汎用的なルールを作るかですね。

幸いロジックはmorpheme-match-allでライブラリ化してあるのでどちらも難しくないですが、辞書を外部管理したいという需要があるなら汎用的なルールを作る感じのほうがいいですかね?
(なんというルール名にすればいいのかがちょっと悩みどころですが… 形態素解析のtokenベースでマッチする辞書を扱うルール という名前付けが難しい)

from textlint-rule-ja-no-abusage.

m-yazaki avatar m-yazaki commented on September 24, 2024

ありがとうございます!

辞書部分(dictionary.js)相当を外部管理できる汎用的なルールがあると、社内で布教しやすいので嬉しいです。

チームごとに(対象読者ごとに)使うルールを変えたいと思っています。

名前は…今のままで外部に辞書を放り出せるだけでも私は十分ですが…

from textlint-rule-ja-no-abusage.

azu avatar azu commented on September 24, 2024

@m-yazaki-line 作ってみました
textlint-ja/textlint-rule-morpheme-match: 形態素解析結果のTokenベースの辞書でマッチするtextlintルール

意図した感じにうごきそうですかね?

from textlint-rule-ja-no-abusage.

m-yazaki avatar m-yazaki commented on September 24, 2024

早い!ありがとうございます!

from textlint-rule-ja-no-abusage.

azu avatar azu commented on September 24, 2024

このIssue自体は閉じても良さそうなので閉じてしまいます。
https://github.com/textlint-ja/textlint-rule-morpheme-match
の方に問題がありましたら、そちらにIssueを立ててください。

from textlint-rule-ja-no-abusage.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.