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

grammar = CloudDeploy[GrammarRules["Привет" -> "Hi"]]; 
GrammarApply[grammar, "Привет"]

(* Out[..] := $Failed *)
  • 1
    $\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$ – Steffen Jaeschke Mar 26 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$ – Kirill Belov Mar 29 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.