S
S
Soft_touch_plastic2021-09-19 17:49:43
PHP
Soft_touch_plastic, 2021-09-19 17:49:43

How to get all particles, prepositions and conjunctions of the Russian language into an array?

Hello, I am writing a back for a site related to text analysis, the question arose - to cut off all particles, prepositions, conjunctions from a string. The length option is not suitable - they will crawl over, under, etc. Perhaps you know specialized resources with such data, or a library for such a case, thanks!

UPD 1:
if anyone needs it, I came across an array of prepositions more or less complete:

$predlogs=array('в', 'без', 'до', 'из', 'к', 'на', 'по', 'о', 'от', 'перед', 'при', 'через', 'с', 'у', 'и', 'нет', 'за', 'над', 'для', 'об', 'под', 'про');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Developer, 2021-09-19
@Soft_touch_plastic

There are not so many particles, prepositions and conjunctions and they do not change their form. Therefore, the most competent and correct decision is to make a list of these words. And it will work instantly, and no libraries with dependencies are needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question