DictionaryCrawler is a Python-based tool designed to crawl example sentences for words from the online dictionary like Cambridge, Oxford, ... using BeautifulSoup. This utility allows you to easily obtain example sentences for a list of words provided in a text file.
Special thanks to Nam Anh for the insightful ideas
- Clone the Reposity
git clone https://github.com/BFCmath/DictionaryCrawler.git
cd DictionaryCrawler
- Install Dependencies
pip install -r requirements.txt
- Prepare the Words-dictionary File
- Replace your dictionary file, named
dictionary.txt
, in the data folder. - Ensure that each line of the file contains a single word.
- Running the script Choose one of the following modes based on your needs:
- Generate a Text File with One Example per Word
python main.py 1
- Generate a Text File with Multiple Examples
python main.py 2
For detailed information about available arguments and configuration options, refer to here.
You can try a demo of this tool without cloning the repository by following this Colab link.