BFCmath/DictionaryCrawler

Find examples for English words from online dictionary.

★ 0Forks 0PythonGitHub ↗Compare

README

DictionaryCrawler

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

Installation

  1. Clone the Reposity
git clone https://github.com/BFCmath/DictionaryCrawler.git
cd DictionaryCrawler
  1. Install Dependencies
pip install -r requirements.txt

Usage

  1. 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.
  1. 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.

DEMO

You can try a demo of this tool without cloning the repository by following this Colab link.

Contributors

BFCmath

Issues