Grammalecte  Diff

Differences From Artifact [851f1e59f5]:

To Artifact [a94325f4c6]:


171
172
173
174
175
176
177














178
179
180
181
182
183
184
        }
        return this.lexicographer.formatTags(sMorph);
    }

    setLabelsOnToken (oToken) {
        if (!this.lexicographer) {
            return;














        }
        this.lexicographer.setLabelsOnToken(oToken);
    }


    // Storage








>
>
>
>
>
>
>
>
>
>
>
>
>
>







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
        }
        return this.lexicographer.formatTags(sMorph);
    }

    setLabelsOnToken (oToken) {
        if (!this.lexicographer) {
            return;
        }
        if (!oToken.hasOwnProperty("lMorph")) {
            oToken["lMorph"] = this.getMorph(oToken["sValue"]);
        }
        if (oToken["sType"] == "WORD") {
            oToken["bValidToken"] = this.isValidToken(oToken["sValue"]);
            let [sPrefix, sStem, sSuffix] = this.lexicographer.split(oToken["sValue"]);
            if (sStem != oToken["sValue"]) {
                oToken["lSubTokens"] = [
                    { "sType": "WORD", "sValue": sPrefix, "lMorph": this.getMorph(sPrefix) },
                    { "sType": "WORD", "sValue": sStem,   "lMorph": this.getMorph(sStem)   },
                    { "sType": "WORD", "sValue": sSuffix, "lMorph": this.getMorph(sSuffix) }
                ];
            }
        }
        this.lexicographer.setLabelsOnToken(oToken);
    }


    // Storage