nineteen

It is determined whether or not the haiku

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

com.github.masahitojp
Идентификатор

Идентификатор

nineteen
Последняя версия

Последняя версия

0.0.6
Дата

Дата

Тип

Тип

jar
Описание

Описание

nineteen
It is determined whether or not the haiku

Скачать nineteen

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.masahitojp/nineteen/ -->
<dependency>
    <groupId>com.github.masahitojp</groupId>
    <artifactId>nineteen</artifactId>
    <version>0.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.masahitojp/nineteen/
implementation 'com.github.masahitojp:nineteen:0.0.6'
// https://jarcasting.com/artifacts/com.github.masahitojp/nineteen/
implementation ("com.github.masahitojp:nineteen:0.0.6")
'com.github.masahitojp:nineteen:jar:0.0.6'
<dependency org="com.github.masahitojp" name="nineteen" rev="0.0.6">
  <artifact name="nineteen" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.masahitojp', module='nineteen', version='0.0.6')
)
libraryDependencies += "com.github.masahitojp" % "nineteen" % "0.0.6"
[com.github.masahitojp/nineteen "0.0.6"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.atilika.kuromoji : kuromoji-unidic jar 0.9.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

nineteen

Find a Senryu from text for Java SE 8. Inspired by ruby/ikku.

Getting Started

Write simple java application

import java.util.Optional;
import java.util.stream.Collectors;
import com.github.masahitojp.nineteen.*;

public class Main {
    public static String toSenryuString(final Optional<Song> songOpt) {
        return songOpt.map(song -> song.getPhrases().stream()
              .map(list -> list.stream().map(Token::toString).collect(Collectors.joining()))
              .collect(Collectors.joining(" "))).orElse("");
    }

    public static void main(String[] args) {
        final Reviewer reviewer = new Reviewer();
        final String haiku1 = "古池や蛙飛び込む水の音";

        System.out.println(toSenryuString(reviewer.find(haiku1)));
        // -> "古池や 蛙飛び込む 水の音"
    }
}

Add dependency to your build.gradle

apply plugin: 'java'

repositories.mavenCentral()

dependencies {
      compile 'com.github.masahitojp:nineteen:0.0.6'
}

sourceCompatibility = targetCompatibility = 1.8

License

Apache License, Version 2.0

Inspired projects

Badges

build status

Версии библиотеки

Версия
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1.0