44
55use InvalidArgumentException ;
66
7+ use SEOService2020 \Morphy \Traits \PreprocessWord ;
78use phpMorphy ;
89use phpMorphy_GrammemsProvider_GrammemsProviderInterface ;
910
@@ -68,45 +69,45 @@ public function name(): string {
6869 }
6970
7071 public function findWord ($ word , $ type = self ::NORMAL ) {
71- return parent ::findWord (self :: preprocessedWord ($ word, $ this ), $ type );
72+ return parent ::findWord ($ this -> preprocessedWord ($ word ), $ type );
7273 }
7374
7475 public function getBaseForm ($ word , $ type = self ::NORMAL ) {
75- return parent ::getBaseForm (self :: preprocessedWord ($ word, $ this ), $ type );
76+ return parent ::getBaseForm ($ this -> preprocessedWord ($ word ), $ type );
7677 }
7778
7879 public function getAllForms ($ word , $ type = self ::NORMAL ) {
79- return parent ::getAllForms (self :: preprocessedWord ($ word, $ this ), $ type );
80+ return parent ::getAllForms ($ this -> preprocessedWord ($ word ), $ type );
8081 }
8182
8283 public function getPseudoRoot ($ word , $ type = self ::NORMAL ) {
83- return parent ::getPseudoRoot (self :: preprocessedWord ($ word, $ this ), $ type );
84+ return parent ::getPseudoRoot ($ this -> preprocessedWord ($ word ), $ type );
8485 }
8586
8687 public function getPartOfSpeech ($ word , $ type = self ::NORMAL ) {
87- return parent ::getPartOfSpeech (self :: preprocessedWord ($ word, $ this ), $ type );
88+ return parent ::getPartOfSpeech ($ this -> preprocessedWord ($ word ), $ type );
8889 }
8990
9091 public function getAllFormsWithAncodes ($ word , $ type = self ::NORMAL ) {
91- return parent ::getAllFormsWithAncodes (self :: preprocessedWord ($ word, $ this ), $ type );
92+ return parent ::getAllFormsWithAncodes ($ this -> preprocessedWord ($ word ), $ type );
9293 }
9394
9495 public function getAllFormsWithGramInfo ($ word , $ asText = true , $ type = self ::NORMAL ) {
9596 return parent ::getAllFormsWithGramInfo (
96- self :: preprocessedWord ($ word, $ this ), $ asText , $ type
97+ $ this -> preprocessedWord ($ word ), $ asText , $ type
9798 );
9899 }
99100
100101 public function getAncode ($ word , $ type = self ::NORMAL ) {
101- return parent ::getAncode (self :: preprocessedWord ($ word, $ this ), $ type );
102+ return parent ::getAncode ($ this -> preprocessedWord ($ word ), $ type );
102103 }
103104
104105 public function getGramInfo ($ word , $ type = self ::NORMAL ) {
105- return parent ::getGramInfo (self :: preprocessedWord ($ word, $ this ), $ type );
106+ return parent ::getGramInfo ($ this -> preprocessedWord ($ word ), $ type );
106107 }
107108
108109 public function getGramInfoMergeForms ($ word , $ type = self ::NORMAL ) {
109- return parent ::getGramInfoMergeForms (self :: preprocessedWord ($ word, $ this ), $ type );
110+ return parent ::getGramInfoMergeForms ($ this -> preprocessedWord ($ word ), $ type );
110111 }
111112
112113 public function castFormByAncode (
@@ -118,9 +119,9 @@ public function castFormByAncode(
118119 $ type = self ::NORMAL
119120 ) {
120121 return parent ::castFormByAncode (
121- self :: preprocessedWord ($ word, $ this ),
122- self :: preprocessedWord ($ ancode, $ this ),
123- self :: preprocessedWord ($ commonAncode, $ this ),
122+ $ this -> preprocessedWord ($ word ),
123+ $ this -> preprocessedWord ($ ancode ),
124+ $ this -> preprocessedWord ($ commonAncode ),
124125 $ returnOnlyWord ,
125126 $ callback ,
126127 $ type
@@ -136,8 +137,8 @@ public function castFormByGramInfo(
136137 $ type = self ::NORMAL
137138 ) {
138139 return parent ::castFormByGramInfo (
139- self :: preprocessedWord ($ word, $ this ),
140- self :: preprocessedWord ($ partOfSpeech, $ this ),
140+ $ this -> preprocessedWord ($ word ),
141+ $ this -> preprocessedWord ($ partOfSpeech ),
141142 $ grammems ,
142143 $ returnOnlyWord ,
143144 $ callback ,
@@ -154,8 +155,8 @@ public function castFormByPattern(
154155 $ type = self ::NORMAL
155156 ) {
156157 return parent ::castFormByPattern (
157- self :: preprocessedWord ($ word, $ this ),
158- self :: preprocessedWord ($ patternWord, $ this ),
158+ $ this -> preprocessedWord ($ word ),
159+ $ this -> preprocessedWord ($ patternWord ),
159160 $ grammemsProvider ,
160161 $ returnOnlyWord ,
161162 $ callback ,
0 commit comments