|
1 | 1 | import * as Dictionary from "../../dictionary/type.ts";
|
2 | 2 | import { Output } from "../output.ts";
|
3 | 3 | import { adjective, compoundAdjective } from "./adjective.ts";
|
4 |
| -import * as English from "./ast.ts"; |
5 | 4 | import * as EnglishComposer from "./composer.ts";
|
6 | 5 | import { nounAsPlainString, simpleNounForms } from "./noun.ts";
|
7 | 6 | import { pronoun } from "./pronoun.ts";
|
8 |
| -import { fromVerbForms, partialVerb } from "./verb.ts"; |
| 7 | +import { partialVerb, verb } from "./verb.ts"; |
9 | 8 |
|
10 | 9 | export function definitionAsPlainString(
|
11 | 10 | definition: Dictionary.Definition,
|
@@ -36,17 +35,10 @@ export function definitionAsPlainString(
|
36 | 35 | case "interjection":
|
37 | 36 | return new Output([definition.interjection]);
|
38 | 37 | case "verb": {
|
39 |
| - return Output.combine( |
40 |
| - fromVerbForms(definition, "third", "plural", 1, false), |
41 |
| - partialVerb(definition, 1, false), |
42 |
| - ) |
43 |
| - .map<English.VerbPhrase>(([verb, partialVerb]) => ({ |
44 |
| - ...partialVerb, |
45 |
| - type: "default", |
46 |
| - verb, |
47 |
| - objectComplement: null, |
48 |
| - hideVerb: false, |
49 |
| - })) |
| 38 | + return partialVerb(definition, 1, false) |
| 39 | + .flatMap((partialVerb) => |
| 40 | + verb({ ...partialVerb, type: "simple" }, "third", "plural") |
| 41 | + ) |
50 | 42 | .map((verb) => EnglishComposer.verb(verb, 0));
|
51 | 43 | }
|
52 | 44 | case "filler":
|
|
0 commit comments