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

Add Parser.parseBoundaries for JavaScript #234

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

kojiishi
Copy link
Collaborator

@kojiishi kojiishi commented Aug 12, 2023

This patch adds Parser.parseBoundaries, which returns a list of boundaries instead of phrases as strings. Parser.parse is changed to call this function.

Before this chagne, the HTMLProcessor computes the list of boudaries from the list of phrase strings. This chagne makes it more efficient by not computing substrings. Also, Parser.parse is slightly more efficient by computing substrings instead of adding one character at a time.

This patch has no behavior changes to existing functions.

@kojiishi kojiishi requested a review from tushuhei August 12, 2023 10:32
@tushuhei
Copy link
Member

LGTM! Thank you for this change.

@tushuhei tushuhei merged commit b4d4998 into google:main Aug 13, 2023
19 checks passed
@kojiishi kojiishi deleted the parseBoundaries branch August 14, 2023 10:46
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.

2 participants