This script is strict corelated with SjpAPI. I could say: "It is the same", but there are a little difference, so go to repo above and take info before you use this script :)!! This version is very low performance. I dont test how many time is to get meaning from two dictionaries. I will be probably very, very long, about 300mins. A "for"s functions should be parareled.
Thsi script was created to easy get all meaning of word(from txt files) from (Słownik języka polskiego)(www.sjp.pl)
- Get "as fresh as tropical fruit"(ONLINE) meaning of any word in dictionary "słownik języka polskiego"
- Only need check word is in dictionary or can be used in game like scrabble. In this case you can check any link from there resolve your problem.
It is correlated with SjpAPI but translated to python language
- Make from you dictionary txt file, a dictionary with meaning of word and you will know from which word your word come from:
Example
"kościany" is from word: "kość"
The most important paragraph.
For the first you MUST to have: Please check, a format of sjp.txt and psf.txt.
- Must be UTF-8
- Only first word from line will be processed
- If one of the above step will be missed , probably script will fail
- If you want to fill only dictionary from SJP.PL:
- Take your dictionary in txt file, make sure there is in UTF-8 format
- Insert this file in "Input folder"
- Call script
python3> DictionaryActualizer.py {NAMEOfYourTextFile}.txt
- A result will be in Output folder witch name: ""fill-{NAMEOfYourTextFile}.txt
- If you have a SJP.PL dictionary and OSPS dictonary:
- Take your dictionaries in txt file, make sure there is in UTF-8 format
- Insert this files in "Input folder"
- Call script
python3> DictionaryActualizer.py {NAMEOfYourSJPDict}.txt {NAMEOfYourOSPSDict}.txt
- A result willbe in:
- filled-same.txt ( The same word which was in SJP and OSPS dictonaries )
- filled-{NAMEOfYourSJPDict}.txt (Word from SJP)
- filled-{NAMEOfYourOSPSDict}.txt (Word from OSPS)
Just clone this repo and here you are ^^
If you clone this repo you can run this command:
python3> DictionaryActualizer.py sjp.txt pfs.txt
And after all check Output folder. You will see a examples :D
This is output from examples:
C:\Users\rik13\Desktop\DictionaryActualizer>python DictionaryActualizer.py sjp.txt pfs.txt
Start to process lines:
sjp: 155 lines
pfs: 117 lines
Splitted dictionaries on:
Same in two dictionaries: 68 lines
Unique in sjp dict: 88 lines
Unique in pfs dict: 45 lines
Processing pfsUnique.txt : ...
Fill pfsUnique.txt
takes time: 22.43681049346924
Processing same.txt : ...
Fill same.txt
takes time: 33.13961362838745
Processing sjpUnique.txt : ...
Fill sjpUnique.txt
takes time: 47.09232306480408
C:\Users\rik13\Desktop\DictionaryActualizer>python DictionaryActualizer.py sjp.txt
Start to process lines: 155
Processing sjp.txt : ...
Fill sjp.txt
takes time: 81.83865451812744
C:\Users\rik13\Desktop\DictionaryActualizer>
Apache