Doushi 1.0.0

dotnet add package Doushi --version 1.0.0                
NuGet\Install-Package Doushi -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Doushi" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Doushi --version 1.0.0                
#r "nuget: Doushi, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Doushi as a Cake Addin
#addin nuget:?package=Doushi&version=1.0.0

// Install Doushi as a Cake Tool
#tool nuget:?package=Doushi&version=1.0.0                

Doushi Library

Doushi is a library for conjugating Japanese verbs to multiple tenses and forms

Package NuGet ID NuGet Status
Kawazu Kawazu Stat

Features

  • Conjugates Japanese verbs into the forms
    • Non past / Non past polite
    • Past / Past polite
    • Te form
    • Potential
    • Passive
    • Causative
    • Causative Passive
    • Imperative
  • Auto detects verb categories

Usage

Install

The package can be installed by NuGet:

Install-Package Doushi -Version 1.0.0

Or reference it in your project:

<PackageReference Include="Doushi" Version="1.0.0" />

Getting Started

Import the library by spacename

using Doushi;

Now you can call this static function to conjugate the verb

// Will auto detect that this is a Godan verb ending in る and will return its conjugation
var conj = Conjugator.Conjugate("作る", "つくる");
// Manually specifiy the verb type
var conj = Conjugator.Conjugate("作る", Doushi.Type.GODAN_RU, "つくる");

The Conjugate() function is going to return an Inflections class that contains all the verb conjugation in the supported forms, will return null in case the verb is not recognized as a verb

Other Public Functions

The TryFindType() is a public function that is used by the Conjugate() function to try and find the verb type

// Will return Type.SPECIAL_KURU
var type = Conjugator.TryFindType("来る", "くる");

The DicToDoushiType() function is used to convert the supported JMDict string types which are ["v1", "v5b", "v5g", "v5k", "v5k-s", "v5m", "v5n", "v5r", "v5r-i", "v5s", "v5t", "v5u", "v5u-s", "vk", "vs-s", "vs-i"] to Doushi.Type enum

// Will return Type.GODAN_MU
var type = Conjugator.DicToDoushiType("v5m")
Conjugator Class

Contains the main functions for verb conjugations

Inflections

Contains the verb conjugation in all the supported forms

Polarity

Contains the verb polarity (Affirmative/Negative) as well as the verb stem reading in case the reading was provided, but always presented for する and 来る verbs

Example
var conj = Conjugator.Conjugate("行く", "いく");
if (conj != null)
{
	Console.WriteLine($" -> Non-Past: {conj.NonPast.Affirmative} | {conj.NonPast.Negative}\n");
	Console.WriteLine($" -> Non-Past Polite: {conj.NonPastPolite.Affirmative} | {conj.NonPastPolite.Negative}\n");
	Console.WriteLine($" -> Past: {conj.Past.Affirmative} | {conj.Past.Negative}\n");
	Console.WriteLine($" -> Past Polite: {conj.PastPolite.Affirmative} | {conj.PastPolite.Negative}\n");
	Console.WriteLine($" -> Te Form: {conj.TeForm.Affirmative} | {conj.TeForm.Negative}\n");
	Console.WriteLine($" -> Potential: {conj.Potential.Affirmative} | {conj.Potential.Negative}\n");
	Console.WriteLine($" -> Passive: {conj.Passive.Affirmative} | {conj.Passive.Negative}\n");
	Console.WriteLine($" -> Causative: {conj.Causative.Affirmative} | {conj.Causative.Negative}\n");
	Console.WriteLine($" -> Causative Passive: {conj.CausativePassive.Affirmative} | {conj.CausativePassive.Negative}\n");
	Console.WriteLine($" -> Imperative: {conj.Imperative.Affirmative} | {conj.Imperative.Negative}\n");
}
else
{
	Console.WriteLine("Invalid input");                   
}

See the Doushi-Example project folder for more info

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 493 4/28/2021