Skip to content

Better understanding of function names/class names #709

Open
@last-partizan

Description

@last-partizan

Thanks for this project, it looks really promising.

I just started using it, and here's what I found, example is this repo:

> gt 'data_file_path' --context 0 --max-results 3
─────────────────────────
File: seagoat/utils/server.py
─────────────────────────
def _get_server_data_file_path() -> Path:
    path = _get_server_data_file_path()
    write_to_json_file(_get_server_data_file_path(), servers_info)

But, when i split name in into words, it cannot find this function.

> gt 'get server data file path' --context 0 --max-results 3
────────────────────────────────────────────────
File: seagoat/server.py
────────────────────────────────────────────────
    logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
────────────────────────────────────────────────
File: docs/server.md
───────────────────────────────────────────
called `cacheLocation` which contains the path to the cache directory for
each different type of cache associated with that project.

That's probably my main use case - to find something without knowing exact name. I'm happy to help with fixing this and doing some research or writing patches.

Maybe you have idea how to impove this? I see there's #354 issue, about trying different models. And probably some other "code-search-oriented model" can improve this.

My absolutely non-ai-related guess, is when encountering snake_case or SomeOtherCase names - convert them to normal words and let it index this. But probably code-search-related models already doing it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions