Skip to content

refactor detectors #380

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

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

refactor detectors #380

wants to merge 2 commits into from

Conversation

Tr4in
Copy link
Contributor

@Tr4in Tr4in commented Sep 11, 2017

Closes #368

@ghost ghost assigned Tr4in Sep 11, 2017
@ghost ghost added the needs review label Sep 11, 2017
@tamacodechi
Copy link
Contributor

👀 Currency?

Copy link
Contributor

@tamacodechi tamacodechi left a comment

Choose a reason for hiding this comment

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

Wonderful, can you do the same for the currency detector? In the case where the text is matched try to stringify the term 😉

@@ -6,7 +6,6 @@ class RelativeDateCalculation
def relative_date(date_relative_to)
return nil if RelativeDateTerm.empty?

date_relative_to if
RelativeDateDetector::SAME_DAY_TERMS.include?(RelativeDateTerm.first.text)
date_relative_to if RelativeDateTerm.first.text =~ RelativeDateDetector::SAME_DAY_TERMS
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@ghost ghost added the needs review label Sep 20, 2017
@Tr4in Tr4in changed the title first commit refactor detectors Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants