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

fix typo #80

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docs/docs/usage/creating-a-new-lyra-instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Currently the available languages are:
- french
- italian
- norwegian
- portugese
- portuguese
- russian
- spanish
- swedish
2 changes: 1 addition & 1 deletion packages/lyra/src/tokenizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const splitRegex: Record<Language, RegExp> = {
french: /[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,
italian: /[^a-z0-9_'-]+/gim,
norwegian: /[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,
portugese: /[^a-zà-úÀ-Ú]/gim,
portuguese: /[^a-zà-úÀ-Ú]/gim,
russian: /[^a-zа-яА-ЯёЁ]+/gim,
spanish: /[^a-zA-Zá-úÁ-ÚñÑüÜ]+/gim,
swedish: /[^a-z0-9_åÅäÄöÖüÜ-]+/gim,
Expand Down
2 changes: 1 addition & 1 deletion packages/lyra/src/tokenizer/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const SUPPORTED_LANGUAGES = [
"french",
"italian",
"norwegian",
"portugese",
"portuguese",
"russian",
"spanish",
"swedish",
Expand Down
4 changes: 2 additions & 2 deletions packages/lyra/tap-snapshots/tests/lyra.test.ts.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Supported languages are:
- french
- italian
- norwegian
- portugese
- portuguese
- russian
- spanish
- swedish
Expand All @@ -80,7 +80,7 @@ Supported languages are:
- french
- italian
- norwegian
- portugese
- portuguese
- russian
- spanish
- swedish
Expand Down
4 changes: 2 additions & 2 deletions packages/lyra/tap-snapshots/tests/tokenizer.test.ts.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Array [
]
`

exports[`tests/tokenizer.test.ts TAP Tokenizer Should tokenize and stem correctly in portugese > Should tokenize and stem correctly in portugese-O1 1`] = `
exports[`tests/tokenizer.test.ts TAP Tokenizer Should tokenize and stem correctly in portuguese > Should tokenize and stem correctly in portuguese-O1 1`] = `
Array [
"eu",
"cozinhei",
Expand All @@ -121,7 +121,7 @@ Array [
]
`

exports[`tests/tokenizer.test.ts TAP Tokenizer Should tokenize and stem correctly in portugese > Should tokenize and stem correctly in portugese-O2 1`] = `
exports[`tests/tokenizer.test.ts TAP Tokenizer Should tokenize and stem correctly in portuguese > Should tokenize and stem correctly in portuguese-O2 1`] = `
Array [
"dormir",
"é",
Expand Down
4 changes: 2 additions & 2 deletions packages/lyra/tests/lyra.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import t from "tap";
import { create, insert, search, remove } from "../src/lyra";
import { create, insert, remove, search } from "../src/lyra";

t.test("defaultLanguage", t => {
t.plan(3);
Expand Down Expand Up @@ -45,7 +45,7 @@ t.test("defaultLanguage", t => {
try {
create({
schema: {},
defaultLanguage: "portugese",
defaultLanguage: "portuguese",
});

t.pass();
Expand Down
6 changes: 3 additions & 3 deletions packages/lyra/tests/tokenizer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ t.test("Tokenizer", t => {
t.matchSnapshot(O2, `${t.name}-O2`);
});

t.test("Should tokenize and stem correctly in portugese", t => {
t.test("Should tokenize and stem correctly in portuguese", t => {
t.plan(2);

const I1 = "Eu cozinhei alguns bolos";
const I2 = "dormir é uma coisa difícil quando os testes falham";

const O1 = tokenize(I1, "portugese");
const O2 = tokenize(I2, "portugese");
const O1 = tokenize(I1, "portuguese");
const O2 = tokenize(I2, "portuguese");

t.matchSnapshot(O1, `${t.name}-O1`);
t.matchSnapshot(O2, `${t.name}-O2`);
Expand Down