Skip to content

Commit

Permalink
RU: Creating the INlandes instance
Browse files Browse the repository at this point in the history
  • Loading branch information
marigostra committed Jan 23, 2022
1 parent 808a8c3 commit d36f0a2
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions ru/src/main/java/org/luwrain/i18n/ru/SpeakableText.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@
import org.luwrain.nlp.ru.*;
import org.luwrain.script2.ScriptUtils;
import org.luwrain.script.hooks.*;
import org.luwrain.inlandes.*;

final class SpeakableText
{
static private final String
HOOK_NATURAL_PRE = "luwrain.i18n.ru.speakable.natural.pre",
HOOK_NATURAL = "luwrain.i18n.ru.speakable.natural",
HOOK_PROGRAMMING_PRE = "luwrain.i18n.ru.speakable.programming.pre";

private final HookContainer hookContainer;
private final Inlandes inlandes = new Inlandes();

SpeakableText(HookContainer hookContainer)
{
NullCheck.notNull(hookContainer, "hookContainer");
this.hookContainer = hookContainer;
this.inlandes.loadStandardLibrary();
}

String process(String text, SpeakableTextType type)
Expand All @@ -56,14 +57,8 @@ String process(String text, SpeakableTextType type)
private String processNatural(String text)
{
NullCheck.notNull(text, "text");
/*
final String t = new TransformerHook(hookContainer).run(HOOK_NATURAL_PRE, text).toString();
final Token[] tokens = ReaderTokenizer.tokenize(t);
final Object tokensRes = new ProviderHook(hookContainer).run(HOOK_NATURAL, new Object[]{ScriptUtils.getArray(tokens)});
if (tokensRes != null && tokensRes.toString() != null)
return tokensRes.toString();
return t;
*/
synchronized(inlandes) {
};
return text;
}

Expand Down

0 comments on commit d36f0a2

Please sign in to comment.