You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
2.8 KiB

  1. Category_CSV = """
  2. text,label
  3. "Terrible customer service.","negative"
  4. "Really great transaction.","positive"
  5. "Great price.","positive"
  6. """
  7. Category_fastText = """
  8. __label__negative Terrible customer service.
  9. __label__positive Really great transaction.
  10. __label__positive Great price.
  11. """
  12. Category_JSON = """
  13. [
  14. {
  15. "text": "Terrible customer service.",
  16. "label": ["negative"]
  17. }
  18. ]
  19. """
  20. Category_JSONL = """
  21. {"text": "Terrible customer service.", "label": ["negative"]}
  22. {"text": "Really great transaction.", "label": ["positive"]}
  23. {"text": "Great price.", "label": ["positive"]}
  24. """
  25. Text_CSV = """
  26. text,label
  27. "Hello!","こんにちは!"
  28. "Good morning.","おはようございます。"
  29. "See you.","さようなら。"
  30. """
  31. Text_JSON = """
  32. [
  33. {
  34. "text": "Hello!",
  35. "label": ["こんにちは!"]
  36. }
  37. ]
  38. """
  39. Text_JSONL = """
  40. {"text": "Hello!", "label": ["こんにちは!"]}
  41. {"text": "Good morning.", "label": ["おはようございます。"]}
  42. {"text": "See you.", "label": ["さようなら。"]}
  43. """
  44. Offset_JSONL = """
  45. {"text": "EU rejects German call to boycott British lamb.", "label": [ [0, 2, "ORG"], [11, 17, "MISC"], ... ]}
  46. {"text": "Peter Blackburn", "label": [ [0, 15, "PERSON"] ]}
  47. {"text": "President Obama", "label": [ [10, 15, "PERSON"] ]}
  48. """
  49. ENTITY_AND_RELATION_JSONL = """
  50. {
  51. "text": "Google was founded on September 4, 1998, by Larry Page and Sergey Brin.",
  52. "entities": [
  53. {
  54. "id": 0,
  55. "start_offset": 0,
  56. "end_offset": 6,
  57. "label": "ORG"
  58. },
  59. {
  60. "id": 1,
  61. "start_offset": 22,
  62. "end_offset": 39,
  63. "label": "DATE"
  64. },
  65. {
  66. "id": 2,
  67. "start_offset": 44,
  68. "end_offset": 54,
  69. "label": "PERSON"
  70. },
  71. {
  72. "id": 3,
  73. "start_offset": 59,
  74. "end_offset": 70,
  75. "label": "PERSON"
  76. }
  77. ],
  78. "relations": [
  79. {
  80. "id": 0,
  81. "from_id": 0,
  82. "to_id": 1,
  83. "type": "foundedAt"
  84. },
  85. {
  86. "id": 1,
  87. "from_id": 0,
  88. "to_id": 2,
  89. "type": "foundedBy"
  90. },
  91. {
  92. "id": 2,
  93. "from_id": 0,
  94. "to_id": 3,
  95. "type": "foundedBy"
  96. }
  97. ]
  98. }
  99. """
  100. CategoryImageClassification = """
  101. [
  102. {
  103. "filename": "20210514.png",
  104. "label": ["cat"]
  105. }
  106. ]
  107. """
  108. Speech2Text = """
  109. [
  110. {
  111. "filename": "20210514.mp3",
  112. "label": ["Lorem ipsum dolor sit amet"]
  113. }
  114. ]
  115. """
  116. INTENT_JSONL = """
  117. {"text": "Find a flight from Memphis to Tacoma", "entities": [[0, 26, "City"], [30, 36, "City"]], "cats": ["flight"]}
  118. {"text": "I want to know what airports are in Los Angeles", "entities": [[36, 47, "City"]], "cats": ["airport"]}
  119. """