fuzzyydictyy


Namefuzzyydictyy JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/fuzzyydictyy
SummaryDict with fuzzy key matching
upload_time2023-07-05 01:54:18
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords fuzzy dict
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Dict with fuzzy key matching 

## pip install fuzzyydictyy 

#### Tested against Windows 10 / Python 3.10 / Anaconda 


### Approximate Key Lookups: 

The fuzzy matching capability allows users to retrieve values even if the exact key is not available. This can be beneficial when dealing with user input, search queries, or data with potential typos or variations.

### Data Normalization: 

By allowing fuzzy matching, FuzzDict can help normalize input keys to a standard form. For example, if you have keys like "JohnDoe," "john_doe," and "John-Doe," you can use FuzzDict to map them to a standardized key, such as "johndoe," ensuring consistent access to the associated values.

### Data Deduplication: 

When working with large datasets, fuzzy key matching can assist in identifying and handling duplicate keys with slight variations. Instead of creating multiple keys for similar values, you can consolidate them under a single key, reducing redundancy and improving data organization.

### Improved User Experience: 

With fuzzy matching, FuzzDict can enhance user experience by accommodating user errors or variations in input. It can provide suggestions or automatically retrieve the closest matching value, reducing frustration and increasing usability.

### Time Efficiency: 

By leveraging the rapidfuzz library, FuzzDict performs efficient fuzzy matching algorithms, enabling quick lookup of values based on approximate keys. This can be especially advantageous when dealing with large datasets or real-time applications that require fast responses.


```python
from fuzzyydictyy import FuzzDict, dict_config
from rapidfuzz import fuzz
dict_config.fuzzycfg = {
  'scorer': fuzz.WRatio,
}
d = FuzzDict()
d["hans"] = 3
d["bobo"] = 30
d["baba"] = 320
print(d['hjan'])  # Output: 3 (Exact match for 'hjan' is not found)
print(d['boba'])  # Output: 30 (Exact match for 'boba' is not found)
print(d['babaa'])  # Output: 320 (Exact match for 'babaa' is not found)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/fuzzyydictyy",
    "name": "fuzzyydictyy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "fuzzy,dict",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/aa/bc/3f207424c2e876beeb86eac63456b5c67b46c17f4e7ffcf22ac51532039e/fuzzyydictyy-0.11.tar.gz",
    "platform": null,
    "description": "\r\n# Dict with fuzzy key matching \r\n\r\n## pip install fuzzyydictyy \r\n\r\n#### Tested against Windows 10 / Python 3.10 / Anaconda \r\n\r\n\r\n### Approximate Key Lookups: \r\n\r\nThe fuzzy matching capability allows users to retrieve values even if the exact key is not available. This can be beneficial when dealing with user input, search queries, or data with potential typos or variations.\r\n\r\n### Data Normalization: \r\n\r\nBy allowing fuzzy matching, FuzzDict can help normalize input keys to a standard form. For example, if you have keys like \"JohnDoe,\" \"john_doe,\" and \"John-Doe,\" you can use FuzzDict to map them to a standardized key, such as \"johndoe,\" ensuring consistent access to the associated values.\r\n\r\n### Data Deduplication: \r\n\r\nWhen working with large datasets, fuzzy key matching can assist in identifying and handling duplicate keys with slight variations. Instead of creating multiple keys for similar values, you can consolidate them under a single key, reducing redundancy and improving data organization.\r\n\r\n### Improved User Experience: \r\n\r\nWith fuzzy matching, FuzzDict can enhance user experience by accommodating user errors or variations in input. It can provide suggestions or automatically retrieve the closest matching value, reducing frustration and increasing usability.\r\n\r\n### Time Efficiency: \r\n\r\nBy leveraging the rapidfuzz library, FuzzDict performs efficient fuzzy matching algorithms, enabling quick lookup of values based on approximate keys. This can be especially advantageous when dealing with large datasets or real-time applications that require fast responses.\r\n\r\n\r\n```python\r\nfrom fuzzyydictyy import FuzzDict, dict_config\r\nfrom rapidfuzz import fuzz\r\ndict_config.fuzzycfg = {\r\n  'scorer': fuzz.WRatio,\r\n}\r\nd = FuzzDict()\r\nd[\"hans\"] = 3\r\nd[\"bobo\"] = 30\r\nd[\"baba\"] = 320\r\nprint(d['hjan'])  # Output: 3 (Exact match for 'hjan' is not found)\r\nprint(d['boba'])  # Output: 30 (Exact match for 'boba' is not found)\r\nprint(d['babaa'])  # Output: 320 (Exact match for 'babaa' is not found)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Dict with fuzzy key matching",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/fuzzyydictyy"
    },
    "split_keywords": [
        "fuzzy",
        "dict"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5195e432c7f95d4a2a69612e0da7126b12c3f4e08bc888127ebee06d9dd05963",
                "md5": "d9b92b332dc609bca1a396f6bf04286a",
                "sha256": "2be50be42eb67b674d722945c00f517c6f0f344a7b702193fb257b5bb958dd96"
            },
            "downloads": -1,
            "filename": "fuzzyydictyy-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d9b92b332dc609bca1a396f6bf04286a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6440,
            "upload_time": "2023-07-05T01:54:16",
            "upload_time_iso_8601": "2023-07-05T01:54:16.826895Z",
            "url": "https://files.pythonhosted.org/packages/51/95/e432c7f95d4a2a69612e0da7126b12c3f4e08bc888127ebee06d9dd05963/fuzzyydictyy-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aabc3f207424c2e876beeb86eac63456b5c67b46c17f4e7ffcf22ac51532039e",
                "md5": "5ae6fc7c672094aa6a4c4dc821097775",
                "sha256": "9e06db56c3aa7091028f12360df5580b0dc22d927cfbb1161ce9dc668129fe65"
            },
            "downloads": -1,
            "filename": "fuzzyydictyy-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "5ae6fc7c672094aa6a4c4dc821097775",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4539,
            "upload_time": "2023-07-05T01:54:18",
            "upload_time_iso_8601": "2023-07-05T01:54:18.242162Z",
            "url": "https://files.pythonhosted.org/packages/aa/bc/3f207424c2e876beeb86eac63456b5c67b46c17f4e7ffcf22ac51532039e/fuzzyydictyy-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-05 01:54:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "fuzzyydictyy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "fuzzyydictyy"
}
        
Elapsed time: 0.20192s