Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

analyze-desumasu-dearu

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analyze-desumasu-dearu

文の敬体(ですます調)、常体(である調)を解析。

  • 2.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52K
increased by3.65%
Maintainers
1
Weekly downloads
 
Created
Source

analyze-desumasu-dearu Build Status

文の敬体(ですます調)、常体(である調)を解析するライブラリ

Installation

npm install analyze-desumasu-dearu

Usage

import {analyzeDesumasu, analyzeDearu} from "analyze-desumasu-dearu";
let text = "昨日はいい天気であったのだが、今日は悪天候である。";
// である の情報
let ret = analyzeDearu(text);
/*
[
    {
        value: "のだが",
        lineNumber: 1,
        columnIndex: 11
    },
    {
        value: "である。",
        lineNumber: 1,
        columnIndex: 21
    }
]
*/
// ですます は含まれてないので空の配列を返す
analyzeDesumasu(text);// []

analyzeDesumasu(text) /analyzeDearu(text) : object[]

textに含まれる文の敬体(ですます調) / 常体(である調)を解析して以下の配列を返します

Analyze text and return following array of object.

[{
    value: string,
    lineNumber: number,  // start with 1
    columnIndex: number  // start with 0
}]

FAQ

Q. Why is lineNumber 1-indexed?

A. This is for compatibility with JavaScript AST.

Tests

npm test

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

Acknowledge

Thank for RedPen.

Keywords

FAQs

Package last updated on 28 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc