Forcolate Library
AI search is like a box of FORcolates. You never know what you're gonna get.
Forcolate is a versatile library designed to enhance semantic search capabilities, in particular in a setting where it is deployed locally (and not in a cloud environment). It offers a suite of tools that facilitate efficient and intelligent search functionalities, making it easier to find relevant information within large datasets.
Features
- Bullet Point Workflow: Process text messages containing bullet points, where each bullet point is handled using a selected tool.
- Semantic Search for Documents: Search for files and documents within local directories using advanced semantic search algorithms.
- Semantic Search for Outlook Emails: Perform semantic search on Microsoft Outlook emails using the Win32 API.
- Convert Documents to Text: Convert documents from various formats (e.g., PDF, Word) into plain text for easier processing.
- Summarize Documents: Generate summaries for individual documents within a specified directory.
- Summarize Folder: Create a single cohesive summary from the contents of all files in a folder.
- Download URL to Text: Fetch and convert web pages or documents from URLs into plain text.
Installation
To install the Forcolate library, use the following command:
pip install forcolate
Usage
Most of the functions are constructed around a key principle : sequence of working folders Each function take as parameters a query, an input folder and an output folder.
- For search function, the search adds new files to the output and copy all (relevant) files from the input folder
- For transformation function (such as summary), the transformation is applied on all files of the input and produce different files in the output
The query in itseld can contain rich informations such as other folders path to take as input.
Bullet Point Workflow
The Forcolate library includes a workflow for processing text messages containing bullet points. Each bullet point is processed using a selected tool. Below is an example of how to use this workflow:
from forcolate.bullet_point_workflow import run_bullet_point_workflow
text_message = """
- Search for documents in the folder
- Summarize the documents
- Convert URLs to text
"""
memory_folder = "path/to/memory/folder" # This folder will contain one folder per step
# Run the workflow
for progress in run_bullet_point_workflow(text_message, memory_folder):
print(f"Step {progress['step']} of {progress['total_steps']}: {progress['message']}")
Semantic Search for Outlook Emails
This tool performs semantic search on Outlook emails using the Win32 API. Below is an example of how to use this tool:
from forcolate import search_outlook_emails
query = "Search emails for 'project updates' "
folder_in = "path/to/input/folder" # all the content will be copied in output
folder_out = "path/to/output/folder"
file_paths = search_outlook_emails(query, folder_in, folder_out)
print(file_paths)
Semantic Search for Documents
This tool searches for documents in a folder (and recursively in subfolder and compressed files) using a semantic search model. Below is an example of how to use this tool:
from forcolate import search_folder
query = "Search for 'financial reports' in path/to/source/directory"
folder_in = "path/to/input/folder" # this folder will also be search in
folder_out = "path/to/output/folder"
file_paths = search_folder(query, folder_in, folder_out)
print(file_paths)
Convert Documents to Text
This tool converts documents from various formats into plain text. Below is an example of how to use this tool:
from forcolate import convert_folders_to_markdown
query = "Convert documents in path/to/source/directory to text"
folder_in = "path/to/input/folder"
folder_out = "path/to/output/folder"
convert_folders_to_markdown(query, folder_in, folder_out)
Summarize Documents
This tool summarizes the content of each individual document within a specified directory. Below is an example of how to use this tool:
from forcolate import summarize_documents
query = "" # Not used at the moment
folder_in = "path/to/input/folder"
folder_out = "path/to/output/folder"
summarize_documents(query, folder_in, folder_out)
Summarize Folder
This tool generates a single summary from all the information in a folder. Below is an example of how to use this tool:
from forcolate import summarize_folder
query = "Summarize all files in path/to/source/directory"
folder_in = "path/to/input/folder"
folder_out = "path/to/output/folder"
summarize_folder(query, folder_in, folder_out)
Download URL to Text
This tool downloads a document or web page from the internet and converts the content into plain text. Below is an example of how to use this tool:
from forcolate import convert_URLS_to_markdown
query = "Download and convert https://example.com/document1 and https://example.com/document2"
folder_in = "path/to/input/folder" # This folder will be copied
folder_out = "path/to/output/folder"
convert_URLS_to_markdown(query, folder_in, folder_out)
Contributing
Contributions to the Forcolate library are welcome! If you have ideas for new features, improvements, or bug fixes, please open an issue or submit a pull request.
Acknowledgement
This project received funding from the French ”IA Cluster” program within the Artificial and Natural Intelligence Toulouse Institute (ANITI) and from the "France 2030" program within IRT Saint Exupery. The authors gratefully acknowledge the support of the FOR projects.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for forcolate 0.1.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forcolate-0.1.18.tar.gz | 128.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forcolate-0.1.18-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 260.2 kB
Release files / forcolate-0.1.18.tar.gz
| Download URL | forcolate-0.1.18.tar.gz |
|---|---|
| Size | 128.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6c13337372642de338084cd128918a5732f9763ad4fcb8616158a221a683ae0
|
|
BLAKE2b-256 checksum How to use checksums |
0af0f70e56d96a18aa55aaed020a66e32eb4f4871bfeed3403eb760760f57a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency logRelease files / forcolate-0.1.18-py3-none-any.whl
| Download URL | forcolate-0.1.18-py3-none-any.whl |
|---|---|
| Size | 131.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da3917aa2cd36ce23e5f83879c38c59b6208c20336fb37d3d38a1c3047c1b40f
|
|
BLAKE2b-256 checksum How to use checksums |
48344177c021a949cc2c96df59285a24420a280dda345e9758556c8715ac4c29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency log