1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "textField": "text",
12 "enrichmentOptions": {
13 "sentiment": true,
14 "entities": true,
15 "keywords": true,
16 "language": true,
17 "readability": true
18 },
19 "validationOptions": {
20 "detectDuplicates": true,
21 "duplicateSimilarityThreshold": 0.85,
22 "detectPII": true,
23 "minTextLength": 10,
24 "maxTextLength": 0
25 },
26 "schemaValidation": {},
27 "outputOptions": {
28 "includeOriginal": true,
29 "flagOnly": false,
30 "removePII": false
31 },
32 "maxItems": 0
33};
34
35
36const run = await client.actor("fiery_dream/ai-training-data-enricher").call(input);
37
38
39console.log('Results from dataset');
40console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46