YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

nltk torch yaml tqdm

  • task: classifying context of the input string, then the model responses based on it.
  • dataset: integrated with yaml format document.

Contextual Understanding Chatbot using Bag-of-Words (BoW)

This project is a Contextual Understanding Chatbot that uses Bag-of-Words (BoW) for text processing. The chatbot is designed to understand and respond to user inputs by converting text data into numerical representations, allowing the model to process and match patterns in conversations.

The chatbot leverages the Bag-of-Words (BoW) technique to represent user inputs as a collection of word frequency vectors. The model is trained to respond contextually based on pre-defined intents or keywords. This approach focuses on understanding the user's intent and matching it to appropriate responses.

Data Preprocessing (BoW)

  • Tokenization: Splitting the text into individual words.
  • Lowercasing: Converting all text to lowercase for uniformity.
  • Stop-word Removal: Removing common words (e.g., "the", "and", "is") that do not contribute to meaningful context.
  • Stemming: Reducing words to their root form (e.g., "running" to "run").
  • Bag-of-Words (BoW): Converting text into a fixed-length vector, where each element represents the frequency of a particular word from a vocabulary.

Instruction

Evaluate Model

Use this command to evaluate your trained model on a specified dataset.

python run.py --path <path>
  • <path>: Path to the model or dataset you want to evaluate.

Train Model

Train your model on a specified training dataset and set the number of iterations for training.

python run.py train --path <trainset_path> --save-to <model_path> --iters <number_iterations>
  • <trainset_path>: Path to your training data file (e.g., train.json or CSV).
  • <number_iterations>: Number of training iterations to run. This controls how many times the model will learn from the data.

Chat with Model

This command allows you to chat with the trained model. The chatbot will respond to your input based on its training. python run.py chat --path <model_path> --response <responses_path> * <model_path>: Path to the trained model you wish to interact with. * <responses_path>: Path to the responses file that contains predefined responses associated with various intents.

λͺ¨λΈ 평가

ν›ˆλ ¨λœ λͺ¨λΈμ„ νŠΉμ • λ°μ΄ν„°μ…‹μ—μ„œ ν‰κ°€ν•˜λ €λ©΄ μ•„λž˜ λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•˜μ„Έμš”.

python run.py --path <path>
  • <path>: ν‰κ°€ν•˜λ €λŠ” λͺ¨λΈ λ˜λŠ” λ°μ΄ν„°μ…‹μ˜ 경둜λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.

λͺ¨λΈ ν›ˆλ ¨

μ§€μ •λœ ν›ˆλ ¨ 데이터셋을 기반으둜 λͺ¨λΈμ„ ν•™μŠ΅μ‹œν‚€κ³ , ν•™μŠ΅ 반볡 횟수λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.

python run.py chat --path <model_path> --response <responses_path>
  • <trainset_path>: ν›ˆλ ¨ 데이터 파일의 경둜 (예: train.json, train.csv).
  • <model_path>: ν•™μŠ΅λœ λͺ¨λΈμ„ μ €μž₯ν•  경둜λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.
  • <number_iterations>: ν•™μŠ΅ 반볡 횟수. λ°μ΄ν„°μ—μ„œ ν•™μŠ΅μ„ μˆ˜ν–‰ν•˜λŠ” 횟수λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.

λŒ€ν™”ν•˜κΈ°

ν›ˆλ ¨λœ λͺ¨λΈκ³Ό λŒ€ν™”λ₯Ό λ‚˜λˆŒ 수 μžˆμŠ΅λ‹ˆλ‹€. 챗봇은 ν›ˆλ ¨ 데이터λ₯Ό 기반으둜 μ‚¬μš©μžμ˜ μž…λ ₯에 μ‘λ‹΅ν•©λ‹ˆλ‹€.

python run.py chat --path <model_path> --response <responses_path>
  • <model_path>: μƒν˜Έμž‘μš©ν•  ν›ˆλ ¨λœ λͺ¨λΈμ˜ 경둜λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.
  • <responses_path>: λ‹€μ–‘ν•œ μ˜λ„(intent)에 λŒ€ν•œ 사전 μ •μ˜λœ 응닡을 ν¬ν•¨ν•œ 파일 경둜λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.