{"id":23852,"library":"highered","title":"highered","description":"Learnable Edit Distance using PyHacrf. Version 0.2.1. Infrequently updated.","status":"active","version":"0.2.1","language":"python","source_language":"en","source_url":"https://github.com/datamade/highered","tags":["edit-distance","machine-learning","pyhacrf","string-matching"],"install":[{"cmd":"pip install highered","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"Main class for learnable edit distance.","wrong":"","symbol":"Higer","correct":"from highered import Higer"},{"note":"Training function.","wrong":"","symbol":"train","correct":"from highered import train"}],"quickstart":{"code":"from highered import Higer, train\n\n# Example training data: pairs of strings with label 1 for match, 0 for mismatch\nX = [('abc', 'abc'), ('abc', 'abd')]\ny = [1, 0]\n\nmodel = Higer()\nmodel.fit(X, y)\n\n# Predict distance\nprint(model.predict(('abc', 'abc')))  # likely less than 0.5\nprint(model.predict(('abc', 'xyz')))  # likely greater than 0.5\n","lang":"python","description":"Train a learnable edit distance model using Higer."},"warnings":[{"fix":"Pin version in requirements and monitor for updates.","message":"The package is in early development (0.2.1). API may change without notice.","severity":"gotcha","affected_versions":"<=0.2.1"},{"fix":"Install in a clean virtual environment or check PyHacrf documentation for system requirements.","message":"The library depends on PyHacrf which has its own dependencies (e.g., numpy, scipy). Ensure a compatible environment.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use pairs of strings; verify with small examples first.","message":"The Higer class may expect specific input types (e.g., lists of tuples of strings). Non-string or unbalanced pairs may fail silently.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install highered' and ensure the correct Python environment is active.","cause":"Package not installed or installed in wrong environment.","error":"ImportError: No module named 'highered'"},{"fix":"Create an instance: model = Higer() then model.fit(X, y).","cause":"Attempting to call the class instead of instantiating and then using .fit or .predict.","error":"TypeError: 'Higer' object is not callable"},{"fix":"Ensure all input strings are of consistent length or pad appropriately. Check PyHacrf documentation.","cause":"Inconsistent dimensions in training data or incompatible internal arrays from PyHacrf.","error":"ValueError: operands could not be broadcast together with shapes"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}