algebraic-search


Namealgebraic-search JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/queelius/algebraic_search
SummaryA Python library for algebraic search.
upload_time2024-11-04 11:38:37
maintainerNone
docs_urlNone
authorAlex Towell
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Boolean and Fuzzy Boolean Query Framework

NOTE: Very early stage. Intend to implement things like fuzzy boolean searching over JSON fields, etc. It should have minimal dependencies and work without
building a database (the raw files will be the representation of the database). All queries are JSON already, so it should be easy to integrate it in web APIs.
The below documentation is not exactly right, since I just asked an LLM to generate it and I haven't had enough time to refine it and fix it. The foundation of this work is based on Boolean algebras and homomorphisms between the queries and the results. It will have a robust command line tool for doing all of this from the command line, but it'll be a fully developed library that can be integrated into any project.

A flexible Python framework for constructing, combining, and evaluating Boolean and Fuzzy Boolean queries against a collection of documents. This framework supports both strict binary evaluations and degrees-of-membership evaluations, laying the groundwork for advanced fuzzy set-theoretic query capabilities.

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
  - [Boolean Queries](#boolean-queries)
  - [Fuzzy Boolean Queries](#fuzzy-boolean-queries)
- [API Documentation](#api-documentation)
  - [BooleanQuery](#booleanquery)
  - [FuzzyBooleanQuery](#fuzzybooleanquery)
  - [ResultQuery](#resultquery)
- [Formal Theory](#formal-theory)
- [Future Enhancements](#future-enhancements)
- [Contributing](#contributing)
- [License](#license)

## Features

- **Boolean Query Construction**: Create complex Boolean queries using `AND`, `OR`, and `NOT` operations.
- **Fuzzy Boolean Query Construction**: Extend Boolean queries with fuzzy logic operations and modifiers like `very` and `somewhat`.
- **Operator Overloading**: Combine queries intuitively using Python's bitwise operators (`&`, `|`, `~`).
- **Unified Evaluation Results**: Utilize a single `ResultQuery` class to handle both Boolean and Fuzzy Boolean query evaluations.
- **TF-IDF Integration**: Utilize Term Frequency-Inverse Document Frequency (TF-IDF) for sophisticated scoring in fuzzy queries.
- **Extensible Design**: Easily extend the framework with additional modifiers or integrate more complex scoring mechanisms.

## Installation

Ensure you have Python 3.7 or higher installed.

Clone the repository:

```bash
git clone https://github.com/queelius/algebraic_search.git
cd algebraic_search
```

## Usage

### Boolean Queries

Create and evaluate strict Boolean queries to determine document matches based on term presence.

```python
from boolean_query import BooleanQuery, ResultQuery

# Initialize BooleanQuery instances
q1 = BooleanQuery("cat dog") # same as BooleanQuery("(and cat dog)")
q2 = BooleanQuery("(or fish bird)")
q3 = ~q2
q4 = q1 & q3  # Represents "(and (and cat dog) (not (or fish bird)))"

# Example documents as sets
documents = [
    {"cat", "dog"},
    {"fish"},
    {"bird"},
    {"cat", "dog", "fish"},
    {"cat", "dog", "bird"},
    {"cat"},
    {"dog"},
    {"fish", "bird"},
    {"cat", "dog", "fish", "bird"},
]

# Evaluate queries against documents
results = q4.eval(documents)
print(q4)
# Output: (and (and cat dog) (not (or fish bird)))
print(results)
# Output: ResultQuery([1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
```

### Fuzzy Boolean Queries

Construct and evaluate fuzzy Boolean queries that consider degrees of term relevance using TF-IDF scores.

```python
from fuzzy_boolean_query import FuzzyBooleanQuery, ResultQuery

# Sample documents
documents_text = [
    "cat dog",
    "fish",
    "bird",
    "cat dog fish",
    "cat dog bird",
    "cat",
    "dog",
    "fish bird",
    "cat dog fish bird",
]

# Compute TF-IDF scores
tfidf_scores, vocabulary = FuzzyBooleanQuery.compute_tfidf(documents_text)

# Initialize FuzzyBooleanQuery with TF-IDF data
q1_fuzzy = FuzzyBooleanQuery("cat dog", tfidf_matrix=tfidf_scores, vocabulary=vocabulary)
q2_fuzzy = FuzzyBooleanQuery("(or fish bird)", tfidf_matrix=tfidf_scores, vocabulary=vocabulary)
q3_fuzzy = ~q2_fuzzy
q4_fuzzy = q1_fuzzy & q3_fuzzy  # Represents "(and (and cat dog) (not (or fish bird)))"

# Evaluate queries against documents
results = q4_fuzzy.eval(documents_text)
print(q4_fuzzy) # Output: (and (and cat dog) (not (or fish bird)))
print(results)  # Output: ResultQuery([...]) with float scores
```

## API Documentation

### BooleanQuery

A class for constructing and evaluating strict Boolean queries.

#### Initialization

```python
BooleanQuery(query: Union[str, List] = None)
```

- `query`: A query string (e.g., `"cat dog"`, `"(or fish bird)"`) or a list of tokens. Defaults to an empty query.

#### Methods

- `tokenize(query: str) -> List`: Parses the query string into a nested list structure.
- `eval(docs: Union[List[Set[str]], Set[str]]) -> ResultQuery`: Evaluates the query against a list of documents.
- Operator Overloads:
  - `&`: Logical AND
  - `|`: Logical OR
  - `~`: Logical NOT

#### Example

```python
q = BooleanQuery("(and cat dog)")
result = q.eval([{"cat", "dog"}, {"cat"}, {"dog"}, {"cat", "dog"}])
print(result)  # ResultQuery([1.0, 0.0, 0.0, 1.0])
```

### FuzzyBooleanQuery

A class for constructing and evaluating fuzzy Boolean queries with degrees of membership.

#### Initialization

```python
FuzzyBooleanQuery(query: Union[str, List])
```

- `query`: A query string or list of tokens.

#### Methods

- `tokenize(query: str) -> List`: Parses the query string into a nested list structure, recognizing fuzzy modifiers.
- `eval(docs: List[str], ranker: Callable) -> ResultQuery`: Evaluates the fuzzy query against a list of documents using some ranker, like a normalized TF-IDF score.
- Operator Overloads:
  - `&`: Logical AND (fuzzy)
  - `|`: Logical OR (fuzzy)
  - `~`: Logical NOT (fuzzy)

#### Example

```python
q_fuzzy = FuzzyBooleanQuery("cat dog")
result_fuzzy = q_fuzzy.eval(docs, ranker=lambda term, doc: 1.0 if term in doc else 0.0)
print(result_fuzzy)  # ResultQuery([...])
```

### ResultQuery

Represents the results of evaluating both `BooleanQuery` and `FuzzyBooleanQuery`.

#### Attributes

- `scores`: A list of floats (`0.0` or `1.0` for Boolean queries, `0.0` to `1.0` for Fuzzy Boolean queries) indicating the degree of membership for each document.

#### Methods

- Operator Overloads:
  - `&`: Element-wise minimum
  - `|`: Element-wise maximum
  - `~`: Element-wise complement

#### Example

```python
r1 = ResultQuery([1.0, 0.0, 1.0])
r2 = ResultQuery([0.5, 1.0, 0.0])  # For BooleanQuery, these should be 0.0 or 1.0
combined = r1 & r2  # ResultQuery([0.5, 0.0, 0.0])
```

*Note*: In `BooleanQuery`, scores should be strictly `0.0` or `1.0`. For `FuzzyBooleanQuery`, scores range between `0.0` and `1.0`.

## Formal Theory

### Boolean Algebra for Queries and Results

#### Query Algebra (`Q`)

- **Elements**: `Q = P(T*)` where `T*` is the set of all finite strings composed of ASCII characters. `P(T*)` is the power set of `T*`.
- **Operations**:
  - **AND (`&`)**: Intersection of two subsets.
  - **OR (`|`)**: Union of two subsets.
  - **NOT (`~`)**: Complement of a subset relative to `T*`.
- **Constants**:
  - **Empty Set (`{}`)**: Matches no documents.
  - **Universal Set (`T*`)**: Matches all documents.

#### Result Algebra (`R`)

- **Elements**: `R = [r_1, r_2, ..., r_n]` where each `r_i` ∈ {0.0, 1.0} for Boolean queries or `r_i` ∈ [0.0, 1.0] for Fuzzy Boolean queries.
- **Operations**:
  - **AND (`&`)**: Element-wise minimum.
  - **OR (`|`)**: Element-wise maximum.
  - **NOT (`~`)**: Element-wise complement (`1.0 - r_i`).

#### Homomorphism

The evaluation functions `BooleanQuery.eval` and `FuzzyBooleanQuery.eval` serve as homomorphisms `φ: Q → R` and `φ_f: Q_f → R_f`, preserving the algebraic structure:

- `φ(Q1 & Q2) = φ(Q1) & φ(Q2)`
- `φ(Q1 | Q2) = φ(Q1) | φ(Q2)`
- `φ(~Q1) = ~φ(Q1)`
- Similarly for fuzzy queries.

### Fuzzy Boolean Algebra for Queries and Results

#### Fuzzy Query Algebra (`Q_f`)

- **Elements**: `Q_f = P(T*)` similar to Boolean queries.
- **Operations**:
  - **AND (`&`)**: Fuzzy intersection using minimum.
  - **OR (`|`)**: Fuzzy union using maximum.
  - **NOT (`~`)**: Fuzzy complement (`1.0 - x`).
  - **Modifiers**: Such as `very`, `somewhat`, etc., to adjust degrees of membership.

#### Fuzzy Result Algebra (`R_f`)

- **Elements**: `R_f = [r_1, r_2, ..., r_n]` where each `r_i` ∈ [0.0, 1.0].
- **Operations**:
  - **AND (`&`)**: Element-wise minimum.
  - **OR (`|`)**: Element-wise maximum.
  - **NOT (`~`)**: Element-wise complement (`1.0 - r_i`).

#### Homomorphism

The evaluation function `eval` in both `BooleanQuery` and `FuzzyBooleanQuery` acts as a homomorphism `φ: Q → R` and `φ_f: Q_f → R_f`, preserving:

- **Preservation of Operations**:
  - `φ(Q1 & Q2) = φ(Q1) & φ(Q2)`
  - `φ(Q1 | Q2) = φ(Q1) | φ(Q2)`
  - `φ(~Q1) = ~φ(Q1)`
- **Preservation of Modifiers**:
  - `φ_f(very Q) = very φ_f(Q)`
  - `φ_f(somewhat Q) = somewhat φ_f(Q)`

This ensures that the logical and fuzzy structures of queries are faithfully represented in the evaluation results.

## Future Enhancements

- **Advanced Fuzzy Operators**: Incorporate more sophisticated fuzzy logic operators and modifiers.
- **Custom Scoring Mechanisms**: Implement alternative scoring strategies beyond TF-IDF, such as BM25.
- **Caching and Optimization**: Optimize performance for large document collections through caching and efficient data structures.
- **Extended Query Language**: Support more complex query constructs and natural language processing features.
- **Integration with Databases and Search Engines**: Facilitate seamless integration with existing data storage and retrieval systems.

## Contributing

Contributions are welcome! Please follow these steps:

1. **Fork the Repository**: Click the "Fork" button on the repository page.
2. **Clone Your Fork**:
   ```bash
   git clone https://github.com/queelius/algebraic_search.git
   cd algebraic_search
   ```
3. **Create a New Branch**:
   ```bash
   git checkout -b feature/YourFeatureName
   ```
4. **Make Your Changes**: Implement your feature or bug fix.
5. **Commit Your Changes**:
   ```bash
   git commit -m "Add your detailed commit message"
   ```
6. **Push to Your Fork**:
   ```bash
   git push origin feature/YourFeatureName
   ```
7. **Create a Pull Request**: Navigate to the original repository and click "Compare & pull request."

Please ensure that your code adheres to the existing style and includes relevant tests.

## License

This project is licensed under the [MIT License](LICENSE).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/queelius/algebraic_search",
    "name": "algebraic-search",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alex Towell",
    "author_email": "lex@metafunctor.com",
    "download_url": "https://files.pythonhosted.org/packages/a0/db/fd899008a655f56263640f793b5c454bba820f2f45f71884e72daf3539a5/algebraic_search-0.1.2.tar.gz",
    "platform": null,
    "description": "# Boolean and Fuzzy Boolean Query Framework\n\nNOTE: Very early stage. Intend to implement things like fuzzy boolean searching over JSON fields, etc. It should have minimal dependencies and work without\nbuilding a database (the raw files will be the representation of the database). All queries are JSON already, so it should be easy to integrate it in web APIs.\nThe below documentation is not exactly right, since I just asked an LLM to generate it and I haven't had enough time to refine it and fix it. The foundation of this work is based on Boolean algebras and homomorphisms between the queries and the results. It will have a robust command line tool for doing all of this from the command line, but it'll be a fully developed library that can be integrated into any project.\n\nA flexible Python framework for constructing, combining, and evaluating Boolean and Fuzzy Boolean queries against a collection of documents. This framework supports both strict binary evaluations and degrees-of-membership evaluations, laying the groundwork for advanced fuzzy set-theoretic query capabilities.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Boolean Queries](#boolean-queries)\n  - [Fuzzy Boolean Queries](#fuzzy-boolean-queries)\n- [API Documentation](#api-documentation)\n  - [BooleanQuery](#booleanquery)\n  - [FuzzyBooleanQuery](#fuzzybooleanquery)\n  - [ResultQuery](#resultquery)\n- [Formal Theory](#formal-theory)\n- [Future Enhancements](#future-enhancements)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- **Boolean Query Construction**: Create complex Boolean queries using `AND`, `OR`, and `NOT` operations.\n- **Fuzzy Boolean Query Construction**: Extend Boolean queries with fuzzy logic operations and modifiers like `very` and `somewhat`.\n- **Operator Overloading**: Combine queries intuitively using Python's bitwise operators (`&`, `|`, `~`).\n- **Unified Evaluation Results**: Utilize a single `ResultQuery` class to handle both Boolean and Fuzzy Boolean query evaluations.\n- **TF-IDF Integration**: Utilize Term Frequency-Inverse Document Frequency (TF-IDF) for sophisticated scoring in fuzzy queries.\n- **Extensible Design**: Easily extend the framework with additional modifiers or integrate more complex scoring mechanisms.\n\n## Installation\n\nEnsure you have Python 3.7 or higher installed.\n\nClone the repository:\n\n```bash\ngit clone https://github.com/queelius/algebraic_search.git\ncd algebraic_search\n```\n\n## Usage\n\n### Boolean Queries\n\nCreate and evaluate strict Boolean queries to determine document matches based on term presence.\n\n```python\nfrom boolean_query import BooleanQuery, ResultQuery\n\n# Initialize BooleanQuery instances\nq1 = BooleanQuery(\"cat dog\") # same as BooleanQuery(\"(and cat dog)\")\nq2 = BooleanQuery(\"(or fish bird)\")\nq3 = ~q2\nq4 = q1 & q3  # Represents \"(and (and cat dog) (not (or fish bird)))\"\n\n# Example documents as sets\ndocuments = [\n    {\"cat\", \"dog\"},\n    {\"fish\"},\n    {\"bird\"},\n    {\"cat\", \"dog\", \"fish\"},\n    {\"cat\", \"dog\", \"bird\"},\n    {\"cat\"},\n    {\"dog\"},\n    {\"fish\", \"bird\"},\n    {\"cat\", \"dog\", \"fish\", \"bird\"},\n]\n\n# Evaluate queries against documents\nresults = q4.eval(documents)\nprint(q4)\n# Output: (and (and cat dog) (not (or fish bird)))\nprint(results)\n# Output: ResultQuery([1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])\n```\n\n### Fuzzy Boolean Queries\n\nConstruct and evaluate fuzzy Boolean queries that consider degrees of term relevance using TF-IDF scores.\n\n```python\nfrom fuzzy_boolean_query import FuzzyBooleanQuery, ResultQuery\n\n# Sample documents\ndocuments_text = [\n    \"cat dog\",\n    \"fish\",\n    \"bird\",\n    \"cat dog fish\",\n    \"cat dog bird\",\n    \"cat\",\n    \"dog\",\n    \"fish bird\",\n    \"cat dog fish bird\",\n]\n\n# Compute TF-IDF scores\ntfidf_scores, vocabulary = FuzzyBooleanQuery.compute_tfidf(documents_text)\n\n# Initialize FuzzyBooleanQuery with TF-IDF data\nq1_fuzzy = FuzzyBooleanQuery(\"cat dog\", tfidf_matrix=tfidf_scores, vocabulary=vocabulary)\nq2_fuzzy = FuzzyBooleanQuery(\"(or fish bird)\", tfidf_matrix=tfidf_scores, vocabulary=vocabulary)\nq3_fuzzy = ~q2_fuzzy\nq4_fuzzy = q1_fuzzy & q3_fuzzy  # Represents \"(and (and cat dog) (not (or fish bird)))\"\n\n# Evaluate queries against documents\nresults = q4_fuzzy.eval(documents_text)\nprint(q4_fuzzy) # Output: (and (and cat dog) (not (or fish bird)))\nprint(results)  # Output: ResultQuery([...]) with float scores\n```\n\n## API Documentation\n\n### BooleanQuery\n\nA class for constructing and evaluating strict Boolean queries.\n\n#### Initialization\n\n```python\nBooleanQuery(query: Union[str, List] = None)\n```\n\n- `query`: A query string (e.g., `\"cat dog\"`, `\"(or fish bird)\"`) or a list of tokens. Defaults to an empty query.\n\n#### Methods\n\n- `tokenize(query: str) -> List`: Parses the query string into a nested list structure.\n- `eval(docs: Union[List[Set[str]], Set[str]]) -> ResultQuery`: Evaluates the query against a list of documents.\n- Operator Overloads:\n  - `&`: Logical AND\n  - `|`: Logical OR\n  - `~`: Logical NOT\n\n#### Example\n\n```python\nq = BooleanQuery(\"(and cat dog)\")\nresult = q.eval([{\"cat\", \"dog\"}, {\"cat\"}, {\"dog\"}, {\"cat\", \"dog\"}])\nprint(result)  # ResultQuery([1.0, 0.0, 0.0, 1.0])\n```\n\n### FuzzyBooleanQuery\n\nA class for constructing and evaluating fuzzy Boolean queries with degrees of membership.\n\n#### Initialization\n\n```python\nFuzzyBooleanQuery(query: Union[str, List])\n```\n\n- `query`: A query string or list of tokens.\n\n#### Methods\n\n- `tokenize(query: str) -> List`: Parses the query string into a nested list structure, recognizing fuzzy modifiers.\n- `eval(docs: List[str], ranker: Callable) -> ResultQuery`: Evaluates the fuzzy query against a list of documents using some ranker, like a normalized TF-IDF score.\n- Operator Overloads:\n  - `&`: Logical AND (fuzzy)\n  - `|`: Logical OR (fuzzy)\n  - `~`: Logical NOT (fuzzy)\n\n#### Example\n\n```python\nq_fuzzy = FuzzyBooleanQuery(\"cat dog\")\nresult_fuzzy = q_fuzzy.eval(docs, ranker=lambda term, doc: 1.0 if term in doc else 0.0)\nprint(result_fuzzy)  # ResultQuery([...])\n```\n\n### ResultQuery\n\nRepresents the results of evaluating both `BooleanQuery` and `FuzzyBooleanQuery`.\n\n#### Attributes\n\n- `scores`: A list of floats (`0.0` or `1.0` for Boolean queries, `0.0` to `1.0` for Fuzzy Boolean queries) indicating the degree of membership for each document.\n\n#### Methods\n\n- Operator Overloads:\n  - `&`: Element-wise minimum\n  - `|`: Element-wise maximum\n  - `~`: Element-wise complement\n\n#### Example\n\n```python\nr1 = ResultQuery([1.0, 0.0, 1.0])\nr2 = ResultQuery([0.5, 1.0, 0.0])  # For BooleanQuery, these should be 0.0 or 1.0\ncombined = r1 & r2  # ResultQuery([0.5, 0.0, 0.0])\n```\n\n*Note*: In `BooleanQuery`, scores should be strictly `0.0` or `1.0`. For `FuzzyBooleanQuery`, scores range between `0.0` and `1.0`.\n\n## Formal Theory\n\n### Boolean Algebra for Queries and Results\n\n#### Query Algebra (`Q`)\n\n- **Elements**: `Q = P(T*)` where `T*` is the set of all finite strings composed of ASCII characters. `P(T*)` is the power set of `T*`.\n- **Operations**:\n  - **AND (`&`)**: Intersection of two subsets.\n  - **OR (`|`)**: Union of two subsets.\n  - **NOT (`~`)**: Complement of a subset relative to `T*`.\n- **Constants**:\n  - **Empty Set (`{}`)**: Matches no documents.\n  - **Universal Set (`T*`)**: Matches all documents.\n\n#### Result Algebra (`R`)\n\n- **Elements**: `R = [r_1, r_2, ..., r_n]` where each `r_i` \u2208 {0.0, 1.0} for Boolean queries or `r_i` \u2208 [0.0, 1.0] for Fuzzy Boolean queries.\n- **Operations**:\n  - **AND (`&`)**: Element-wise minimum.\n  - **OR (`|`)**: Element-wise maximum.\n  - **NOT (`~`)**: Element-wise complement (`1.0 - r_i`).\n\n#### Homomorphism\n\nThe evaluation functions `BooleanQuery.eval` and `FuzzyBooleanQuery.eval` serve as homomorphisms `\u03c6: Q \u2192 R` and `\u03c6_f: Q_f \u2192 R_f`, preserving the algebraic structure:\n\n- `\u03c6(Q1 & Q2) = \u03c6(Q1) & \u03c6(Q2)`\n- `\u03c6(Q1 | Q2) = \u03c6(Q1) | \u03c6(Q2)`\n- `\u03c6(~Q1) = ~\u03c6(Q1)`\n- Similarly for fuzzy queries.\n\n### Fuzzy Boolean Algebra for Queries and Results\n\n#### Fuzzy Query Algebra (`Q_f`)\n\n- **Elements**: `Q_f = P(T*)` similar to Boolean queries.\n- **Operations**:\n  - **AND (`&`)**: Fuzzy intersection using minimum.\n  - **OR (`|`)**: Fuzzy union using maximum.\n  - **NOT (`~`)**: Fuzzy complement (`1.0 - x`).\n  - **Modifiers**: Such as `very`, `somewhat`, etc., to adjust degrees of membership.\n\n#### Fuzzy Result Algebra (`R_f`)\n\n- **Elements**: `R_f = [r_1, r_2, ..., r_n]` where each `r_i` \u2208 [0.0, 1.0].\n- **Operations**:\n  - **AND (`&`)**: Element-wise minimum.\n  - **OR (`|`)**: Element-wise maximum.\n  - **NOT (`~`)**: Element-wise complement (`1.0 - r_i`).\n\n#### Homomorphism\n\nThe evaluation function `eval` in both `BooleanQuery` and `FuzzyBooleanQuery` acts as a homomorphism `\u03c6: Q \u2192 R` and `\u03c6_f: Q_f \u2192 R_f`, preserving:\n\n- **Preservation of Operations**:\n  - `\u03c6(Q1 & Q2) = \u03c6(Q1) & \u03c6(Q2)`\n  - `\u03c6(Q1 | Q2) = \u03c6(Q1) | \u03c6(Q2)`\n  - `\u03c6(~Q1) = ~\u03c6(Q1)`\n- **Preservation of Modifiers**:\n  - `\u03c6_f(very Q) = very \u03c6_f(Q)`\n  - `\u03c6_f(somewhat Q) = somewhat \u03c6_f(Q)`\n\nThis ensures that the logical and fuzzy structures of queries are faithfully represented in the evaluation results.\n\n## Future Enhancements\n\n- **Advanced Fuzzy Operators**: Incorporate more sophisticated fuzzy logic operators and modifiers.\n- **Custom Scoring Mechanisms**: Implement alternative scoring strategies beyond TF-IDF, such as BM25.\n- **Caching and Optimization**: Optimize performance for large document collections through caching and efficient data structures.\n- **Extended Query Language**: Support more complex query constructs and natural language processing features.\n- **Integration with Databases and Search Engines**: Facilitate seamless integration with existing data storage and retrieval systems.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. **Fork the Repository**: Click the \"Fork\" button on the repository page.\n2. **Clone Your Fork**:\n   ```bash\n   git clone https://github.com/queelius/algebraic_search.git\n   cd algebraic_search\n   ```\n3. **Create a New Branch**:\n   ```bash\n   git checkout -b feature/YourFeatureName\n   ```\n4. **Make Your Changes**: Implement your feature or bug fix.\n5. **Commit Your Changes**:\n   ```bash\n   git commit -m \"Add your detailed commit message\"\n   ```\n6. **Push to Your Fork**:\n   ```bash\n   git push origin feature/YourFeatureName\n   ```\n7. **Create a Pull Request**: Navigate to the original repository and click \"Compare & pull request.\"\n\nPlease ensure that your code adheres to the existing style and includes relevant tests.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library for algebraic search.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/queelius/algebraic_search"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f1b9b9af7626a55d2e52a9a4dad67af6e215f5272401c62a51264f693ae0389",
                "md5": "07c5801feba1d31e461cdfac28e97a0b",
                "sha256": "ebe899d21b4697ffd4517a44da86bcdb9e695ef24761b2b3e5310ee25a9e6ded"
            },
            "downloads": -1,
            "filename": "algebraic_search-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "07c5801feba1d31e461cdfac28e97a0b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11964,
            "upload_time": "2024-11-04T11:38:36",
            "upload_time_iso_8601": "2024-11-04T11:38:36.729841Z",
            "url": "https://files.pythonhosted.org/packages/5f/1b/9b9af7626a55d2e52a9a4dad67af6e215f5272401c62a51264f693ae0389/algebraic_search-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0dbfd899008a655f56263640f793b5c454bba820f2f45f71884e72daf3539a5",
                "md5": "4a98bb73a745d5deaff3d281824995c6",
                "sha256": "8841955fbc846789b6ec1c9e67848a0f7ce99e67d906d6132bdb074f3cc435e9"
            },
            "downloads": -1,
            "filename": "algebraic_search-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4a98bb73a745d5deaff3d281824995c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 12810,
            "upload_time": "2024-11-04T11:38:37",
            "upload_time_iso_8601": "2024-11-04T11:38:37.563086Z",
            "url": "https://files.pythonhosted.org/packages/a0/db/fd899008a655f56263640f793b5c454bba820f2f45f71884e72daf3539a5/algebraic_search-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 11:38:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "queelius",
    "github_project": "algebraic_search",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "algebraic-search"
}
        
Elapsed time: 1.54134s