Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe committed Oct 2, 2024
1 parent d958855 commit 098d8db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/tokenizer-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@ describe('Tokenizer', () => {
}
});

it('Should tokenize compound words', function () {

expect(RiTa.tokenize("snow-capped")).eql(["snow-capped"]);
expect(RiTa.tokenize("whole-hearted")).eql(["whole-hearted"]);
expect(RiTa.tokenize("dun-colored")).eql(["dun-colored"]);
});

it('Should call tokenize only', function () {

expect(RiTa.tokenize("")).eql([""]);
Expand All @@ -189,6 +196,9 @@ describe('Tokenizer', () => {
expect(RiTa.tokenize("The find.")).eql(["The", "find", "."]);
expect(RiTa.tokenize("The bancor.", { debug: 0 })).eql(["The", "bancor", "."]);
expect(RiTa.tokenize("The prof. ate.", { debug: 0 })).eql(["The", "prof.", "ate", "."]);
expect(RiTa.tokenize("The snow-capped peaks")).eql(["The","snow-capped","peaks"]);
expect(RiTa.tokenize("The whole-hearted sighs")).eql(["The","whole-hearted","sighs"]);
expect(RiTa.tokenize("The dun-colored hills")).eql(["The","dun-colored","hills"]);

let input, expected, output;

Expand Down

0 comments on commit 098d8db

Please sign in to comment.