本文へ移動

Hikidashi引き出し

和暦と漢数字の相互変換、活用した語の辞書形、漢字への読みの割り当て、貼り付けた文からの単語の抽出、文の難しさ。日本語のテキストを扱う小さな道具を集めた引き出しです。

「引き出し」という名前は、道具が一つずつしまってあり、必要なときに取り出して使える、という意味です。 名前について(英語)

目次

リファレンス · 辞書形

followsAsVerbStem関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Whether following opens with an ending that only a verb's stem takes (ます, ました, ません, ましょう, まして, たい, なさい), so that the word before it is being written as a stem. A noun is never followed by ます: 行き before ます is the verb 行く, and 行き before nothing is the noun "bound for".

インポート

import { followsAsVerbStem } from "@johnmorrisdotca/hikidashi/deinflect";

ほかのエクスポート元: @johnmorrisdotca/hikidashi

定義

function followsAsVerbStem(following: string): boolean

引数

名前型説明
followingstring

The text right after a word, as much of it as you have.

戻り値

boolean

True when it opens with one of those endings; false otherwise, including for an empty string.

例

import { followsAsVerbStem } from "@johnmorrisdotca/hikidashi/deinflect";

console.log(followsAsVerbStem("ます。"), followsAsVerbStem("たいです"), followsAsVerbStem("の電車"), followsAsVerbStem(""));
true true false false

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hikidashi 1.1.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。