| 12345678910111213141516171819202122 |
- import { enhanceFormsOfWords } from './src/api/yjbdc/aiController.js';
- // 创建一个测试用例
- const testJson = {
- ArticleEnglish: [
- "The quick brown fox jumps over the lazy dog.",
- "She is running in the park every morning.",
- "They have been working on this project for months.",
- "I went to the store yesterday and bought some groceries.",
- "The children are playing with their new toys."
- ],
- FormsOfWords: []
- };
- // 测试单词列表
- const testWords = "fox, run, go, play, work";
- // 调用函数
- const result = enhanceFormsOfWords(testJson, testWords);
- // 打印结果
- console.log(JSON.stringify(result, null, 2));
|