Skip to content

Conversation

@jzonthemtn
Copy link
Contributor

@jzonthemtn jzonthemtn commented Feb 9, 2017

This pull request makes the length for the Prefix- and SuffixFeatureGenerator configurable. It defaults to 4 (the original value) if not provided. This pull request also prevents duplicate features from being returned in cases where the given length is larger than the token's size.

@wcolen
Copy link
Member

wcolen commented Feb 10, 2017

Thank you for your PR. The code looks great. Can you please squash the commit and fix the first line of yours commit message? The first line should 72 characters max.

@jzonthemtn
Copy link
Contributor Author

@wcolen Sure -- I think that's got it.

}

@Test
public void lengthTest2() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: possible to come up with a better name for this - never mind if its too long, but it would make better sense to a first timer reading this code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree. Those test names are not the most descriptive. I'll consider their names again. If you think of anything better in the meantime let me know.

@smarthi
Copy link
Member

smarthi commented Feb 10, 2017

+1 lgtm

return prefs;
public static final int DEFAULT_MAX_LENGTH = 4;

private int prefixLength;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be final.

return suffs;
public static final int DEFAULT_MAX_LENGTH = 4;

private int suffixLength;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be final.

@kottmann
Copy link
Member

Looks like this is almost good to be merged. Can you squash the commits? And address the remaining feedback.

@jzonthemtn
Copy link
Contributor Author

@kottmann Yes, commits squashed, added new lines, and made the ints final.

@asfgit asfgit closed this in b7d3abc Feb 16, 2017
asfgit pushed a commit that referenced this pull request Apr 16, 2017
asfgit pushed a commit that referenced this pull request Apr 20, 2017
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.

4 participants