Read CSV File

Java

CsvFileCrawler crawler = new CsvFileCrawler();
crawler.setProperty("file", "file/example_utf8.csv");
List<Document> docs = crawler.crawlDocuments();
System.err.println(DocumentUtil.toJsonPrettyString(docs));

CSV File

DOCUMENTID,DATE,ITEM1,TEXT
001,2020-01-01,AAA,THIS IS TEST1.
002,2020-01-02,BBB,THIS IS TEST2.
003,2020-01-01,AAA,THIS IS TEST3.

Result

[
  {
    "DOCUMENTID": "001",
    "DATE": "2020-01-01",
    "ITEM1": "AAA",
    "TEXT": "THIS IS TEST1.",
    "keywords": []
  },
  {
    "DOCUMENTID": "002",
    "DATE": "2020-01-02",
    "ITEM1": "BBB",
    "TEXT": "THIS IS TEST2.",
    "keywords": []
  },
  {
    "DOCUMENTID": "003",
    "DATE": "2020-01-01",
    "ITEM1": "AAA",
    "TEXT": "THIS IS TEST3.",
    "keywords": []
  }
]