瀏覽代碼

add wbw case test data

visuddhinanda 3 年之前
父節點
當前提交
0a09ca0f64
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      dashboard/src/components/nut/Home.tsx

+ 11 - 2
dashboard/src/components/nut/Home.tsx

@@ -15,6 +15,9 @@ const Widget = () => {
   const valueMake = (value: string) => {
   const valueMake = (value: string) => {
     return { value: value, status: 3 };
     return { value: value, status: 3 };
   };
   };
+  const valueMake2 = (value: string[]) => {
+    return { value: value, status: 3 };
+  };
   for (let index = 0; index < 20; index++) {
   for (let index = 0; index < 20; index++) {
     wbwData.push({
     wbwData.push({
       word: valueMake("Word" + index),
       word: valueMake("Word" + index),
@@ -24,6 +27,7 @@ const Widget = () => {
       factorMeaning: valueMake("mean+mean"),
       factorMeaning: valueMake("mean+mean"),
       type: valueMake(".n."),
       type: valueMake(".n."),
       grammar: valueMake(".m.$.sg.$.nom."),
       grammar: valueMake(".m.$.sg.$.nom."),
+      case: valueMake2(["n", "m", "sg", "nom"]),
       confidence: 1,
       confidence: 1,
     });
     });
   }
   }
@@ -34,8 +38,13 @@ const Widget = () => {
       <div style={{ width: 700 }}>
       <div style={{ width: 700 }}>
         <WbwSent
         <WbwSent
           data={wbwData}
           data={wbwData}
-          display="inline"
-          fields={{ meaning: true, factors: false, case: false }}
+          display="block"
+          fields={{
+            meaning: true,
+            factors: true,
+            factorMeaning: true,
+            case: true,
+          }}
         />
         />
       </div>
       </div>
       <h2>channel picker</h2>
       <h2>channel picker</h2>