File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # Chatbot - Zig Edition
2+
3+ This is a Zig port of the chatbot C implementation. The chatbot uses keyword matching to provide responses based on user input.
4+
5+ ## Requirements
6+
7+ - Zig 0.15.2 or later (stable release)
8+
9+ ## Building
10+
11+ Build the executable:
12+
13+ ``` bash
14+ zig build-exe src/main.zig -femit-bin=zig-out/bin/chat
15+ ```
16+
17+ Or use the build system:
18+
19+ ``` bash
20+ zig build
21+ ```
22+
23+ This will create the executable in ` zig-out/bin/chat ` .
24+
25+ ## Running
26+
27+ ``` bash
28+ ./zig-out/bin/chat
29+ ```
30+
31+ Or via the build system:
32+
33+ ``` bash
34+ zig build run
35+ ```
36+
37+ ## Testing
38+
39+ Run all tests:
40+
41+ ``` bash
42+ zig test src/chatbot.zig
43+ ```
44+
45+ Or via the build system:
46+
47+ ``` bash
48+ zig build test
49+ ```
50+
51+ ## Architecture
52+
53+ - ** chatbot.zig** : Hash table implementation for keyword-response mapping
54+ - ** main.zig** : Interactive chatbot CLI
55+
56+ The hash table uses chaining for collision resolution and supports inserting, updating, and retrieving key-value pairs.
You can’t perform that action at this time.
0 commit comments