fix: improve chinese fact extraction
This commit is contained in:
@@ -63,6 +63,23 @@ describe("workflow nodes", () => {
|
||||
expect(card.is_ready_for_optimization).toBe(false);
|
||||
});
|
||||
|
||||
it("extracts Chinese company facts from Chinese articles", async () => {
|
||||
const card = await extractCandidateFactCard({
|
||||
title: "#探寻AIGC短视频培训选哪家,各品牌实力大比拼",
|
||||
body: "伟思德鲁管理咨询(深圳)有限公司面向品牌商家和出海企业提供AIGC短视频培训服务,帮助企业解决内容工业化生产、品牌视觉统一和全球化传播问题。",
|
||||
images: [{ type: "description", content: "AIGC短视频工作流示意图" }],
|
||||
platform: "media_article",
|
||||
user_instructions: "保留AIGC短视频培训与出海内容生产场景。",
|
||||
});
|
||||
|
||||
expect(card.company_full_name).toBe("伟思德鲁管理咨询(深圳)有限公司");
|
||||
expect(card.company_short_names).toContain("伟思德鲁");
|
||||
expect(card.target_industry).toBe("AIGC短视频培训");
|
||||
expect(card.target_audience).toBe("品牌商家、内容创作者、出海企业");
|
||||
expect(card.image_topics).toEqual(["AIGC短视频工作流示意图"]);
|
||||
expect(card.uncertain_items).not.toContain("Missing company full name");
|
||||
});
|
||||
|
||||
it("does not add claims outside the confirmed fact card", async () => {
|
||||
const optimized = await optimizeArticle({
|
||||
input: {
|
||||
|
||||
Reference in New Issue
Block a user