Skip to content

Commit 70d63f7

Browse files
committed
fix spellings
1 parent 7611ba2 commit 70d63f7

File tree

12 files changed

+42
-40
lines changed

12 files changed

+42
-40
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Inside update (intended for developers):
212212
- Rewritten whole code to use TypeScript, module, and functional programming.
213213
- Rewritten parser to use parser combinator.
214214
- Add language codes to html.
215-
- New wiki for contributors and thinkerers.
215+
- New wiki for contributors and tinkerers.
216216
- Overhaul `README.md`, only including build instruction. Information about the
217217
translator is now moved to wiki.
218218

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ themselves serves as a space for broader topics, not just ilo Token.
109109
programming language, it uses similar techniques found in programming language
110110
development e.g. parsing.
111111

112-
These are unnoficial spaces and are not subject to the
112+
These are unofficial spaces and are not subject to the
113113
[Contributor Covenant Code of Conduct](https://github.com/ilo-token/ilo-token.github.io/blob/master/CODE_OF_CONDUCT.md).
114114
Instead, each have its own rules and different moderators.

dictionary/dictionary

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ soko:
13611361
sona:
13621362
knowledge(n);
13631363
information(n);
1364-
data(n plural); # data is not singular, datum sounds unfamaliar
1364+
data(n plural); # data is not singular, datum sounds unfamiliar
13651365

13661366
know(v) [object];
13671367
have(v) skill(n singular) in(prep) [object];
@@ -1463,7 +1463,7 @@ tawa:
14631463
# walking(n gerund);
14641464
shaking(n gerund);
14651465
flight(n);
1466-
travelling(n gerund);
1466+
traveling(n gerund);
14671467

14681468
to(prep) [indirect object];
14691469
for(prep) [indirect object];
@@ -1536,12 +1536,12 @@ tomo:
15361536
tonsi:
15371537
non-binary(adj qualifier) person(n);
15381538
gender nonconforming(adj qualifier) person(n);
1539-
genderqueer(adj qualifier) person(n);
1539+
gender-queer(adj qualifier) person(n);
15401540
transgender(adj qualifier) person(n);
15411541

15421542
non-binary(adj qualifier);
15431543
gender nonconforming(adj qualifier);
1544-
genderqueer(adj qualifier);
1544+
gender-queer(adj qualifier);
15451545
transgender(adj qualifier);
15461546

15471547
tu:

src/parser/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const phrase: Parser<Phrase> = lazy(() =>
234234
modifiers,
235235
emphasis: phraseModifier,
236236
})),
237-
binaryWords(preverbSet, "preveb").map(([preverb, phrase]) => ({
237+
binaryWords(preverbSet, "preverb").map(([preverb, phrase]) => ({
238238
type: "preverb",
239239
preverb: { type: "default", word: preverb, emphasis: null },
240240
modifiers: [],

src/parser/parser_lib.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,46 @@ export type ValueRest<T> = Readonly<{ rest: string; value: T }>;
88
export type ParserResult<T> = ArrayResult<ValueRest<T>>;
99

1010
export class Parser<T> {
11-
readonly unmemoizedParser: (src: string) => ParserResult<T>;
11+
readonly nonMemoizedParser: (src: string) => ParserResult<T>;
1212
readonly rawParser: (src: string) => ParserResult<T>;
1313
static cache: null | ClearableCacheSet = null;
1414
constructor(parser: (src: string) => ParserResult<T>) {
15-
this.unmemoizedParser = parser;
15+
this.nonMemoizedParser = parser;
1616
if (Parser.cache != null) {
1717
const cache = new Map<string, MemoizationCacheResult<ParserResult<T>>>();
1818
Parser.addToCache(cache);
19-
this.rawParser = memoize(this.unmemoizedParser, { cache });
19+
this.rawParser = memoize(this.nonMemoizedParser, { cache });
2020
} else {
21-
this.rawParser = this.unmemoizedParser;
21+
this.rawParser = this.nonMemoizedParser;
2222
}
2323
}
2424
parser(): (src: string) => ArrayResult<T> {
2525
const { rawParser } = this;
2626
return (src) => rawParser(src).map(({ value }) => value);
2727
}
2828
map<U>(mapper: (value: T) => U): Parser<U> {
29-
const { unmemoizedParser } = this;
29+
const { nonMemoizedParser: unmemoizedParser } = this;
3030
return new Parser((src) =>
3131
unmemoizedParser(src)
3232
.map(({ value, rest }) => ({ value: mapper(value), rest }))
3333
);
3434
}
3535
filter(mapper: (value: T) => boolean): Parser<T> {
36-
const { unmemoizedParser } = this;
36+
const { nonMemoizedParser: unmemoizedParser } = this;
3737
return new Parser((src) =>
3838
unmemoizedParser(src).filter(({ value }) => mapper(value))
3939
);
4040
}
4141
then<U>(mapper: (value: T) => Parser<U>): Parser<U> {
4242
const { cache } = Parser;
43-
const { unmemoizedParser } = this;
43+
const { nonMemoizedParser: unmemoizedParser } = this;
4444
return new Parser((src) => {
4545
const parser = Parser.inContext(() => unmemoizedParser(src), cache);
4646
return parser.flatMap(({ value, rest }) => mapper(value).rawParser(rest));
4747
});
4848
}
4949
sort(comparer: (left: T, right: T) => number): Parser<T> {
50-
const { unmemoizedParser } = this;
50+
const { nonMemoizedParser: unmemoizedParser } = this;
5151
return new Parser((src) =>
5252
unmemoizedParser(src).sort((left, right) =>
5353
comparer(left.value, right.value)
@@ -105,18 +105,18 @@ export const nothing = new Parser((src) =>
105105
export const emptyArray = nothing.map(() => []);
106106
export function lookAhead<T>(parser: Parser<T>): Parser<T> {
107107
return new Parser((src) =>
108-
parser.unmemoizedParser(src).map(({ value }) => ({ value, rest: src }))
108+
parser.nonMemoizedParser(src).map(({ value }) => ({ value, rest: src }))
109109
);
110110
}
111111
export function lazy<T>(parser: () => Parser<T>): Parser<T> {
112112
const { cache } = Parser;
113113
if (Parser.cache != null) {
114114
const cachedParser = new Lazy(() => Parser.inContext(parser, cache));
115115
Parser.addToCache(cachedParser);
116-
return new Parser((src) => cachedParser.getValue().unmemoizedParser(src));
116+
return new Parser((src) => cachedParser.getValue().nonMemoizedParser(src));
117117
} else {
118118
return new Parser((src) =>
119-
Parser.inContext(parser, cache).unmemoizedParser(src)
119+
Parser.inContext(parser, cache).nonMemoizedParser(src)
120120
);
121121
}
122122
}
@@ -272,7 +272,7 @@ export function withSource<T>(
272272
parser: Parser<T>,
273273
): Parser<readonly [value: T, source: string]> {
274274
return new Parser((src) =>
275-
parser.unmemoizedParser(src).map(({ value, rest }) => ({
275+
parser.nonMemoizedParser(src).map(({ value, rest }) => ({
276276
value: [value, src.slice(0, src.length - rest.length)],
277277
rest,
278278
}))

src/translator/adjective.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { nullableAsArray, throwError } from "../../misc/misc.ts";
44
import * as TokiPona from "../parser/ast.ts";
55
import * as English from "./ast.ts";
66
import { UntranslatableError } from "./error.ts";
7-
import { unemphasized, word } from "./word.ts";
7+
import { noEmphasis, word } from "./word.ts";
88

99
export type AdjectiveWithInWay = Readonly<{
1010
adjective: English.AdjectivePhrase;
@@ -38,7 +38,7 @@ export function adjective(
3838
.map(({ emphasis, so }) => ({
3939
type: "simple",
4040
kind: definition.kind,
41-
adverb: [...definition.adverb, ...nullableAsArray(so)].map(unemphasized),
41+
adverb: [...definition.adverb, ...nullableAsArray(so)].map(noEmphasis),
4242
adjective: word({
4343
word: definition.adjective,
4444
reduplicationCount,

src/translator/clause.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { perspective } from "./noun.ts";
77
import { multiplePhrases, multiplePhrasesAsNoun } from "./phrase.ts";
88
import { predicate } from "./predicate.ts";
99
import { nounAsPreposition } from "./preposition.ts";
10-
import { addModalToAll, adverbless, verb } from "./verb.ts";
11-
import { unemphasized } from "./word.ts";
10+
import { addModalToAll, noAdverbs, verb } from "./verb.ts";
11+
import { noEmphasis } from "./word.ts";
1212

1313
function phraseClause(
1414
phrases: TokiPona.MultiplePhrases,
@@ -49,7 +49,7 @@ function phraseClause(
4949
type: "default",
5050
verb: {
5151
modal: null,
52-
verb: [adverbless(unemphasized("is"))],
52+
verb: [noAdverbs(noEmphasis("is"))],
5353
},
5454
subjectComplement: {
5555
type: "adjective",
@@ -103,7 +103,7 @@ function iWish(
103103
type: "simple",
104104
determiner: [],
105105
adjective: [],
106-
noun: unemphasized("I"),
106+
noun: noEmphasis("I"),
107107
quantity: "singular",
108108
perspective: "first",
109109
postAdjective: null,
@@ -114,7 +114,7 @@ function iWish(
114114
type: "default",
115115
verb: {
116116
modal: null,
117-
verb: [adverbless(unemphasized("wish"))],
117+
verb: [noAdverbs(noEmphasis("wish"))],
118118
},
119119
subjectComplement: null,
120120
contentClause: {
@@ -145,7 +145,7 @@ function oClause(
145145
type: "simple",
146146
determiner: [],
147147
adjective: [],
148-
noun: unemphasized("you"),
148+
noun: noEmphasis("you"),
149149
quantity: "plural",
150150
perspective: "second",
151151
postAdjective: null,
@@ -161,7 +161,7 @@ function oClause(
161161
ArrayResult.from(() =>
162162
verb(
163163
addModalToAll(
164-
adverbless(unemphasized("should")),
164+
noAdverbs(noEmphasis("should")),
165165
predicate,
166166
),
167167
subjectPerspective,

src/translator/modifier.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { noun } from "./noun.ts";
1414
import { number } from "./number.ts";
1515
import { phrase } from "./phrase.ts";
1616
import { pronoun } from "./pronoun.ts";
17-
import { unemphasized, word } from "./word.ts";
17+
import { noEmphasis, word } from "./word.ts";
1818
import { getReduplicationCount } from "./word_unit.ts";
1919

2020
export type ModifierTranslation =
@@ -285,7 +285,7 @@ export function multipleModifiers(
285285
type: "simple",
286286
determiner: [],
287287
adjective,
288-
noun: unemphasized("way"),
288+
noun: noEmphasis("way"),
289289
quantity: "singular",
290290
perspective: "third",
291291
postAdjective: null,

src/translator/preposition.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ArrayResult } from "../array_result.ts";
22
import * as TokiPona from "../parser/ast.ts";
33
import * as English from "./ast.ts";
44
import { TranslationTodoError } from "./error.ts";
5-
import { unemphasized } from "./word.ts";
5+
import { noEmphasis } from "./word.ts";
66

77
export function preposition(
88
_preposition: TokiPona.Preposition,
@@ -15,7 +15,7 @@ export function nounAsPreposition(
1515
): English.Preposition {
1616
return {
1717
adverb: [],
18-
preposition: unemphasized(preposition),
18+
preposition: noEmphasis(preposition),
1919
object: phrase,
2020
};
2121
}

src/translator/sentence.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { definitionAsPlainString } from "./as_string.ts";
66
import * as English from "./ast.ts";
77
import { clause, contextClause } from "./clause.ts";
88
import { FilteredOutError, TranslationTodoError } from "./error.ts";
9-
import { unemphasized } from "./word.ts";
9+
import { noEmphasis } from "./word.ts";
1010

1111
function filler(filler: TokiPona.Filler): ArrayResult<string> {
1212
switch (filler.type) {
@@ -146,7 +146,9 @@ function sentence(
146146
);
147147
if (sentence.kinOrTaso != null) {
148148
return new ArrayResult(
149-
new TranslationTodoError(`"${sentence.kinOrTaso.word}" preclause`),
149+
new TranslationTodoError(
150+
`"${sentence.kinOrTaso.word}" starting particle`,
151+
),
150152
);
151153
}
152154
const lastEngClause = clause(sentence.finalClause);
@@ -180,7 +182,7 @@ function sentence(
180182
.map<English.Sentence>((interjection) => ({
181183
clauses: [{
182184
type: "interjection",
183-
interjection: unemphasized(interjection),
185+
interjection: noEmphasis(interjection),
184186
}],
185187
punctuation,
186188
}));

0 commit comments

Comments
 (0)