I want to use PLI with GrammarToken/GrammarRules/GrammarApply in Russian language. But it doesn't work

grammar = CloudDeploy[GrammarRules["Привет" -> "Здравствуй"]]; 
GrammarApply[grammar, "Привет"]

(* Out[..] := $Failed *)
  • 2
    $\begingroup$ This is not the way Grammar is meant by WRI. It is a different concept to Language. Classify["Language", {"Привет"}] gives {Entity["Language", "Russian"]}, analog for "Hi". TextTranslation["Привет"] gives "Hello". TextTranslation has the option target language. Language is different from grammar. I. e. TextTranslation["Grammar","Russian] gives Грамматики. Introduce for example with [en.wikipedia.org/wiki/Grammar] yourself. Then look at [reference.wolfram.com/language/guide/… for the Grammar construction primitives Mathematica offers. $\endgroup$ Commented Mar 26, 2020 at 21:05
  • $\begingroup$ @user2432923 I do not understand what you mean. I do not want to do a translator, I want to process Russian. Or do you think that only English can be processed? $\endgroup$ Commented Mar 29, 2020 at 19:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.