Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longest prefix #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Longest prefix #30

wants to merge 2 commits into from

Conversation

Dobatymo
Copy link

@Dobatymo Dobatymo commented Jul 18, 2018

I added a method longest_prefix() which returns the longest prefix of a string from the dawg. It is similar to .prefixes(s)[-1]. For pure DAWG it will return the prefix only, for BytesDAWG and IntDAWG it will return the prefix plus the payload.

See #12 for some discussion about that method.

Compiled and run tests successfully for python 3.5, 3.6 and 3.7

EDIT: Rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant