Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,81 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Processed Wikipedia SQLite Databases for Wikilite
|
2 |
+
|
3 |
+
This dataset provides pre-processed SQLite databases of Wikipedia articles for use with the [Wikilite](https://github.com/eja/wikilite) tool. These databases allow you to quickly and efficiently search and access Wikipedia content offline using Wikilite's lexical and semantic search capabilities.
|
4 |
+
|
5 |
+
## Supported Languages
|
6 |
+
|
7 |
+
Currently, the dataset includes databases for the following languages:
|
8 |
+
|
9 |
+
* **Sardinian (sc)**
|
10 |
+
* **Italian (it)**
|
11 |
+
* **Spanish (es)**
|
12 |
+
|
13 |
+
More languages may be added in the future.
|
14 |
+
|
15 |
+
## Dataset Structure
|
16 |
+
|
17 |
+
Each language is stored as a separate compressed file (`.db.gz`) within the dataset. For example:
|
18 |
+
|
19 |
+
* `it.db.gz` - Italian Wikipedia database
|
20 |
+
* `sc.db.gz` - Sardinian Wikipedia database
|
21 |
+
* `es.db.gz` - Spanish Wikipedia database
|
22 |
+
|
23 |
+
## How to Use this Dataset
|
24 |
+
|
25 |
+
1. **Download the Desired Database:** Choose the database for the language you want to use and download the corresponding `.db.gz` file.
|
26 |
+
|
27 |
+
2. **Decompress the Database:** Use a tool like `gunzip` to decompress the downloaded file. For example, on Linux or macOS, you can run the following command in your terminal:
|
28 |
+
|
29 |
+
```bash
|
30 |
+
gunzip it.db.gz
|
31 |
+
```
|
32 |
+
This will create the decompressed database file (`it.db` in the example above).
|
33 |
+
|
34 |
+
3. **Install Wikilite**: Follow the instructions on the [Wikilite github repo](https://github.com/eja/wikilite) to clone the repository and build the binary.
|
35 |
+
|
36 |
+
4. **Run Wikilite:** Navigate to the directory where you extracted the database and where you have the compiled `wikilite` binary. Use the `wikilite` command with the appropriate options. For example, to start the web interface for the Italian database, use:
|
37 |
+
|
38 |
+
```bash
|
39 |
+
./wikilite --db it.db --web
|
40 |
+
```
|
41 |
+
|
42 |
+
This will start a local web server allowing you to browse and search the Wikipedia content.
|
43 |
+
|
44 |
+
**Command-line Usage:** Alternatively, you can search the database directly from the command line:
|
45 |
+
|
46 |
+
```bash
|
47 |
+
./wikilite --db it.db --query "search term"
|
48 |
+
```
|
49 |
+
|
50 |
+
5. **Access the Web Interface:** If you started the web server, open a web browser and navigate to `http://localhost:35248` to access the web interface.
|
51 |
+
|
52 |
+
## About Wikilite
|
53 |
+
|
54 |
+
[Wikilite](https://github.com/eja/wikilite) is a tool that provides offline access to Wikipedia content, featuring:
|
55 |
+
|
56 |
+
* **Fast and Flexible Lexical Searching:** Uses FTS5 (Full-Text Search 5) for efficient keyword-based searching.
|
57 |
+
* **Enhanced Semantic Search:** Integrates with Qdrant (optional) for semantic search capabilities, allowing you to find information based on meaning rather than just keywords.
|
58 |
+
* **Offline Access:** Enables access to Wikipedia articles without an internet connection.
|
59 |
+
* **Command-Line Interface (CLI):** Allows direct searching from the terminal.
|
60 |
+
* **Web Interface (Optional):** Provides a user-friendly way to browse and search content.
|
61 |
+
|
62 |
+
### Semantic Search Details
|
63 |
+
|
64 |
+
Wikilite leverages text embeddings for its optional semantic search. This allows you to find results even if your query does not match keywords directly, handling cases like:
|
65 |
+
|
66 |
+
* Typos in your search query.
|
67 |
+
* Different wordings to express the same concept.
|
68 |
+
* The article uses synonyms or related terms.
|
69 |
+
|
70 |
+
**Note:** To enable semantic search, you'll need to have a running Qdrant instance and configure Wikilite accordingly. See the Wikilite GitHub repository for more details.
|
71 |
+
|
72 |
+
## Contributing
|
73 |
+
|
74 |
+
If you would like to contribute databases for additional languages, please feel free to submit a pull request.
|
75 |
+
|
76 |
+
## Acknowledgments
|
77 |
+
|
78 |
+
* [Wikipedia](https://www.wikipedia.org/): For providing the valuable data.
|
79 |
+
* [SQLite](https://www.sqlite.org/): For the robust database engine.
|
80 |
+
* [Qdrant](https://qdrant.tech/): For the high-performance vector database used in semantic search.
|
81 |
+
* [Wikilite](https://github.com/eja/wikilite): For making this project possible.
|