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

Create a new test with an strange Sequences issue #8

Closed
rocboronat opened this issue Apr 20, 2016 · 7 comments
Closed

Create a new test with an strange Sequences issue #8

rocboronat opened this issue Apr 20, 2016 · 7 comments

Comments

@rocboronat
Copy link
Member

Test public void getSequences_shouldNotCrash_whenPassingAQuitNowText1() throws InterruptedException { String text = "@Twinx@ Texie@sabertooth89 great Quit!!"; List<Sequence> sequences = new MentionDetector(text).getSequences(); assertThat(sequences).hasSize(1); }

... right now, it breaks, 'cause it returns two Sequences instead of only one.

@rocboronat rocboronat changed the title Create a new test with an extrange Sequences issue Create a new test with an strange Sequences issue Feb 7, 2019
@EsteveAguilera
Copy link
Member

I'm adding some info I've found when debugging the test you added:

parseMention() detects 3 mentions:

  • (at)Twinx
  • (at)Texie
  • (at)sabertooth89

getSequences() detects 2 sequences:

  • 0-12 -> (at)Twinx(at) Texie
  • 13-26 -> (at)sabertooth89

You say that it should return 1 sequence instead of 2 so the real mention/sequence should be just (at)Twinx. Am I right?

@rocboronat
Copy link
Member Author

Mmmm that's what I thought three years ago, haha! Now I think that "@ Texie" shouldn't be considered a mention. What do you think? 😄

@EsteveAguilera
Copy link
Member

Ouch, I didn't realize this was a 3 y.o issue 😅

Just to see what others consider a mention, and what doesn’t, I’ve done a test on TW, and found something different...

2df5e027-ecfc-403c-a6c4-e1217f5bbf96

And I agree with TW, a mention is a mention, you type it wrong? Sorry, but no mention....

@rocboronat
Copy link
Member Author

Hahaha good test! Then we should edit the library to catch this case.

Sounds not that easy, by the way, hahaha!

@EsteveAguilera
Copy link
Member

🤔This sounds me like a new issue. Maybe something like "change the definition of mention".
What do you think @rocboronat?

@rocboronat
Copy link
Member Author

That's true! :·)

@rocboronat
Copy link
Member Author

Let's move the discussion to #10

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

No branches or pull requests

2 participants