W
W
wodo4ka2017-04-04 19:24:44
Database
wodo4ka, 2017-04-04 19:24:44

Is there a database of Russian words with the ability to search for words with the given parameters (ext.)?

For example, you need to find a word with the following parameters:
Word of 6 letters;
Letters 2 and 3 are the same as letters 5 and 6.
*ab*ab
It is necessary that all words that satisfy this rule be presented in the output.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-04-04
@sim3x

Where can I get the database of Russian words?

with open('/tmp/zdb-win.txt', 'r', encoding='cp1251') as f:
    for w in f:
        w_clean = w.strip()
        if len(w_clean) > 6 and 
             w_clean[2] == w_clean[5] and w_clean[3] == w_clean[6]: 
            print(w_clean)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question