@polarisoffice_ai/polaris-ai-datainsight
v0.1.3
Published
TypeScript SDK for Polaris AI DataInsight - Converts documents in various formats into structured JSON data
Maintainers
Readme
polaris-ai-datainsight
This package is TypeScript SDK for Polaris AI DataInsight.
Converts documents in various formats—including Word, HWP, Sheets, and Slides—into structured JSON data.
Installation and Setup
You need to install a npm package:
npm install polaris-ai-datainsightAnd you should configure credentials by setting the following environment variables:
export POLARIS_AI_DATA_INSIGHT_API_KEY="your-api-key"Refer to here how to get an Polaris AI DataInsight API key.
Document Extractor
Set the file path to extract and the directory path to store resource files included in the file:
import { PolarisAIDataInsightExtractor } from 'polaris-ai-datainsight';
const extractor = new PolarisAIDataInsightExtractor({
filePath: "path/to/file",
resourcesDir: "path/to/dir"
});Extract document data:
const dictData = await extractor.extract();Document Loaders
import { PolarisAIDataInsightLoader } from 'polaris-ai-datainsight';
const loader = new PolarisAIDataInsightLoader({
filePath: "path/to/file",
resourcesDir: "path/to/dir"
});Load documents:
const docs = await loader.load();