mindee 4.8.1 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +6 -3
- package/package.json +1 -1
- package/src/cli.js +42 -2
- package/src/client.d.ts +14 -1
- package/src/client.js +16 -14
- package/src/parsing/generated/generatedList.js +1 -4
- package/src/product/barcodeReader/barcodeReaderV1.js +6 -1
- package/src/product/cropper/cropperV1.js +6 -1
- package/src/product/eu/driverLicense/driverLicenseV1.d.ts +17 -0
- package/src/product/eu/driverLicense/driverLicenseV1.js +28 -0
- package/src/product/eu/driverLicense/driverLicenseV1Document.d.ts +36 -0
- package/src/product/eu/driverLicense/driverLicenseV1Document.js +79 -0
- package/src/product/eu/driverLicense/driverLicenseV1Page.d.ts +14 -0
- package/src/product/eu/driverLicense/driverLicenseV1Page.js +29 -0
- package/src/product/eu/driverLicense/internal.d.ts +2 -0
- package/src/product/eu/driverLicense/internal.js +7 -0
- package/src/product/eu/index.d.ts +1 -0
- package/src/product/eu/index.js +3 -1
- package/src/product/eu/internal.d.ts +1 -0
- package/src/product/eu/internal.js +2 -1
- package/src/product/eu/licensePlate/licensePlateV1.js +6 -1
- package/src/product/financialDocument/financialDocumentV1.js +6 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV1.js +6 -1
- package/src/product/fr/bankAccountDetails/bankAccountDetailsV2.js +6 -1
- package/src/product/fr/carteGrise/carteGriseV1.js +6 -1
- package/src/product/fr/carteVitale/carteVitaleV1.js +6 -1
- package/src/product/fr/idCard/idCardV1.js +6 -1
- package/src/product/fr/idCard/idCardV2.js +6 -1
- package/src/product/index.d.ts +3 -0
- package/src/product/index.js +7 -1
- package/src/product/internal.d.ts +2 -0
- package/src/product/internal.js +3 -1
- package/src/product/internationalId/internal.d.ts +4 -0
- package/src/product/internationalId/internal.js +11 -0
- package/src/product/internationalId/internationalIdV1.d.ts +16 -0
- package/src/product/internationalId/internationalIdV1.js +27 -0
- package/src/product/internationalId/internationalIdV1Document.d.ts +42 -0
- package/src/product/internationalId/internationalIdV1Document.js +101 -0
- package/src/product/internationalId/internationalIdV2.d.ts +16 -0
- package/src/product/internationalId/internationalIdV2.js +27 -0
- package/src/product/internationalId/internationalIdV2Document.d.ts +46 -0
- package/src/product/internationalId/internationalIdV2Document.js +111 -0
- package/src/product/invoice/invoiceV4.js +6 -1
- package/src/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +6 -1
- package/src/product/passport/passportV1.js +6 -1
- package/src/product/proofOfAddress/proofOfAddressV1.js +6 -1
- package/src/product/receipt/receiptV5.js +6 -1
- package/src/product/resume/internal.d.ts +7 -0
- package/src/product/resume/internal.js +17 -0
- package/src/product/resume/resumeV1.d.ts +16 -0
- package/src/product/resume/resumeV1.js +27 -0
- package/src/product/resume/resumeV1Certificate.d.ts +34 -0
- package/src/product/resume/resumeV1Certificate.js +87 -0
- package/src/product/resume/resumeV1Document.d.ts +51 -0
- package/src/product/resume/resumeV1Document.js +197 -0
- package/src/product/resume/resumeV1Education.d.ts +40 -0
- package/src/product/resume/resumeV1Education.js +117 -0
- package/src/product/resume/resumeV1Language.d.ts +30 -0
- package/src/product/resume/resumeV1Language.js +67 -0
- package/src/product/resume/resumeV1ProfessionalExperience.d.ts +42 -0
- package/src/product/resume/resumeV1ProfessionalExperience.js +127 -0
- package/src/product/resume/resumeV1SocialNetworksUrl.d.ts +30 -0
- package/src/product/resume/resumeV1SocialNetworksUrl.js +67 -0
- package/src/product/us/bankCheck/bankCheckV1.js +6 -1
- package/src/product/us/driverLicense/driverLicenseV1.js +6 -1
- package/src/product/us/w9/w9V1.js +6 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Inference, StringDict, Page } from "../../parsing/common";
|
|
2
|
+
import { ResumeV1Document } from "./resumeV1Document";
|
|
3
|
+
/**
|
|
4
|
+
* Inference prediction for Resume, API version 1.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ResumeV1 extends Inference {
|
|
7
|
+
/** The endpoint's name. */
|
|
8
|
+
endpointName: string;
|
|
9
|
+
/** The endpoint's version. */
|
|
10
|
+
endpointVersion: string;
|
|
11
|
+
/** The document-level prediction. */
|
|
12
|
+
prediction: ResumeV1Document;
|
|
13
|
+
/** The document's pages. */
|
|
14
|
+
pages: Page<ResumeV1Document>[];
|
|
15
|
+
constructor(rawPrediction: StringDict);
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResumeV1 = void 0;
|
|
4
|
+
const common_1 = require("../../parsing/common");
|
|
5
|
+
const resumeV1Document_1 = require("./resumeV1Document");
|
|
6
|
+
/**
|
|
7
|
+
* Inference prediction for Resume, API version 1.
|
|
8
|
+
*/
|
|
9
|
+
class ResumeV1 extends common_1.Inference {
|
|
10
|
+
constructor(rawPrediction) {
|
|
11
|
+
super(rawPrediction);
|
|
12
|
+
/** The endpoint's name. */
|
|
13
|
+
this.endpointName = "resume";
|
|
14
|
+
/** The endpoint's version. */
|
|
15
|
+
this.endpointVersion = "1";
|
|
16
|
+
/** The document's pages. */
|
|
17
|
+
this.pages = [];
|
|
18
|
+
this.prediction = new resumeV1Document_1.ResumeV1Document(rawPrediction["prediction"]);
|
|
19
|
+
rawPrediction["pages"].forEach((page) => {
|
|
20
|
+
if (page.prediction !== undefined && page.prediction !== null &&
|
|
21
|
+
Object.keys(page.prediction).length > 0) {
|
|
22
|
+
this.pages.push(new common_1.Page(resumeV1Document_1.ResumeV1Document, page, page["id"], page["orientation"]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ResumeV1 = ResumeV1;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StringDict } from "../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* The list of certificates obtained by the candidate.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ResumeV1Certificate {
|
|
7
|
+
#private;
|
|
8
|
+
/** The grade obtained for the certificate. */
|
|
9
|
+
grade: string | undefined;
|
|
10
|
+
/** The name of certification. */
|
|
11
|
+
name: string | undefined;
|
|
12
|
+
/** The organization or institution that issued the certificate. */
|
|
13
|
+
provider: string | undefined;
|
|
14
|
+
/** The year when a certificate was issued or received. */
|
|
15
|
+
year: string | undefined;
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
confidence: number;
|
|
18
|
+
/** The document page on which the information was found. */
|
|
19
|
+
pageId: number;
|
|
20
|
+
/**
|
|
21
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
22
|
+
* the field in the document.
|
|
23
|
+
*/
|
|
24
|
+
polygon: Polygon;
|
|
25
|
+
constructor({ prediction }: StringDict);
|
|
26
|
+
/**
|
|
27
|
+
* Default string representation.
|
|
28
|
+
*/
|
|
29
|
+
toString(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
32
|
+
*/
|
|
33
|
+
toTableLine(): string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _ResumeV1Certificate_instances, _ResumeV1Certificate_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ResumeV1Certificate = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* The list of certificates obtained by the candidate.
|
|
12
|
+
*/
|
|
13
|
+
class ResumeV1Certificate {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_ResumeV1Certificate_instances.add(this);
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
this.confidence = 0.0;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
this.polygon = [];
|
|
23
|
+
this.grade = prediction["grade"];
|
|
24
|
+
this.name = prediction["name"];
|
|
25
|
+
this.provider = prediction["provider"];
|
|
26
|
+
this.year = prediction["year"];
|
|
27
|
+
this.pageId = prediction["page_id"];
|
|
28
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
29
|
+
if (prediction["polygon"]) {
|
|
30
|
+
this.polygon = prediction.polygon;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Default string representation.
|
|
35
|
+
*/
|
|
36
|
+
toString() {
|
|
37
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Certificate_instances, "m", _ResumeV1Certificate_printableValues).call(this);
|
|
38
|
+
return ("Grade: " +
|
|
39
|
+
printable.grade +
|
|
40
|
+
", Name: " +
|
|
41
|
+
printable.name +
|
|
42
|
+
", Provider: " +
|
|
43
|
+
printable.provider +
|
|
44
|
+
", Year: " +
|
|
45
|
+
printable.year);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
49
|
+
*/
|
|
50
|
+
toTableLine() {
|
|
51
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Certificate_instances, "m", _ResumeV1Certificate_printableValues).call(this);
|
|
52
|
+
return ("| " +
|
|
53
|
+
printable.grade.padEnd(10) +
|
|
54
|
+
" | " +
|
|
55
|
+
printable.name.padEnd(30) +
|
|
56
|
+
" | " +
|
|
57
|
+
printable.provider.padEnd(25) +
|
|
58
|
+
" | " +
|
|
59
|
+
printable.year.padEnd(4) +
|
|
60
|
+
" |");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ResumeV1Certificate = ResumeV1Certificate;
|
|
64
|
+
_ResumeV1Certificate_instances = new WeakSet(), _ResumeV1Certificate_printableValues = function _ResumeV1Certificate_printableValues() {
|
|
65
|
+
return {
|
|
66
|
+
grade: this.grade ?
|
|
67
|
+
this.grade.length <= 10 ?
|
|
68
|
+
this.grade :
|
|
69
|
+
this.grade.slice(0, 7) + "..." :
|
|
70
|
+
"",
|
|
71
|
+
name: this.name ?
|
|
72
|
+
this.name.length <= 30 ?
|
|
73
|
+
this.name :
|
|
74
|
+
this.name.slice(0, 27) + "..." :
|
|
75
|
+
"",
|
|
76
|
+
provider: this.provider ?
|
|
77
|
+
this.provider.length <= 25 ?
|
|
78
|
+
this.provider :
|
|
79
|
+
this.provider.slice(0, 22) + "..." :
|
|
80
|
+
"",
|
|
81
|
+
year: this.year ?
|
|
82
|
+
this.year.length <= 4 ?
|
|
83
|
+
this.year :
|
|
84
|
+
this.year.slice(0, 1) + "..." :
|
|
85
|
+
"",
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Prediction, StringDict } from "../../parsing/common";
|
|
2
|
+
import { ResumeV1SocialNetworksUrl } from "./resumeV1SocialNetworksUrl";
|
|
3
|
+
import { ResumeV1Language } from "./resumeV1Language";
|
|
4
|
+
import { ResumeV1Education } from "./resumeV1Education";
|
|
5
|
+
import { ResumeV1ProfessionalExperience } from "./resumeV1ProfessionalExperience";
|
|
6
|
+
import { ResumeV1Certificate } from "./resumeV1Certificate";
|
|
7
|
+
import { ClassificationField, StringField } from "../../parsing/standard";
|
|
8
|
+
/**
|
|
9
|
+
* Document data for Resume, API version 1.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ResumeV1Document implements Prediction {
|
|
12
|
+
/** The location information of the candidate, including city, state, and country. */
|
|
13
|
+
address: StringField;
|
|
14
|
+
/** The list of certificates obtained by the candidate. */
|
|
15
|
+
certificates: ResumeV1Certificate[];
|
|
16
|
+
/** The ISO 639 code of the language in which the document is written. */
|
|
17
|
+
documentLanguage: StringField;
|
|
18
|
+
/** The type of the document sent. */
|
|
19
|
+
documentType: ClassificationField;
|
|
20
|
+
/** The list of the candidate's educational background. */
|
|
21
|
+
education: ResumeV1Education[];
|
|
22
|
+
/** The email address of the candidate. */
|
|
23
|
+
emailAddress: StringField;
|
|
24
|
+
/** The candidate's first or given names. */
|
|
25
|
+
givenNames: StringField[];
|
|
26
|
+
/** The list of the candidate's technical abilities and knowledge. */
|
|
27
|
+
hardSkills: StringField[];
|
|
28
|
+
/** The position that the candidate is applying for. */
|
|
29
|
+
jobApplied: StringField;
|
|
30
|
+
/** The list of languages that the candidate is proficient in. */
|
|
31
|
+
languages: ResumeV1Language[];
|
|
32
|
+
/** The ISO 3166 code for the country of citizenship of the candidate. */
|
|
33
|
+
nationality: StringField;
|
|
34
|
+
/** The phone number of the candidate. */
|
|
35
|
+
phoneNumber: StringField;
|
|
36
|
+
/** The candidate's current profession. */
|
|
37
|
+
profession: StringField;
|
|
38
|
+
/** The list of the candidate's professional experiences. */
|
|
39
|
+
professionalExperiences: ResumeV1ProfessionalExperience[];
|
|
40
|
+
/** The list of social network profiles of the candidate. */
|
|
41
|
+
socialNetworksUrls: ResumeV1SocialNetworksUrl[];
|
|
42
|
+
/** The list of the candidate's interpersonal and communication abilities. */
|
|
43
|
+
softSkills: StringField[];
|
|
44
|
+
/** The candidate's last names. */
|
|
45
|
+
surnames: StringField[];
|
|
46
|
+
constructor(rawPrediction: StringDict, pageId?: number);
|
|
47
|
+
/**
|
|
48
|
+
* Default string representation.
|
|
49
|
+
*/
|
|
50
|
+
toString(): string;
|
|
51
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResumeV1Document = void 0;
|
|
4
|
+
const common_1 = require("../../parsing/common");
|
|
5
|
+
const resumeV1SocialNetworksUrl_1 = require("./resumeV1SocialNetworksUrl");
|
|
6
|
+
const resumeV1Language_1 = require("./resumeV1Language");
|
|
7
|
+
const resumeV1Education_1 = require("./resumeV1Education");
|
|
8
|
+
const resumeV1ProfessionalExperience_1 = require("./resumeV1ProfessionalExperience");
|
|
9
|
+
const resumeV1Certificate_1 = require("./resumeV1Certificate");
|
|
10
|
+
const standard_1 = require("../../parsing/standard");
|
|
11
|
+
/**
|
|
12
|
+
* Document data for Resume, API version 1.
|
|
13
|
+
*/
|
|
14
|
+
class ResumeV1Document {
|
|
15
|
+
constructor(rawPrediction, pageId) {
|
|
16
|
+
/** The list of certificates obtained by the candidate. */
|
|
17
|
+
this.certificates = [];
|
|
18
|
+
/** The list of the candidate's educational background. */
|
|
19
|
+
this.education = [];
|
|
20
|
+
/** The candidate's first or given names. */
|
|
21
|
+
this.givenNames = [];
|
|
22
|
+
/** The list of the candidate's technical abilities and knowledge. */
|
|
23
|
+
this.hardSkills = [];
|
|
24
|
+
/** The list of languages that the candidate is proficient in. */
|
|
25
|
+
this.languages = [];
|
|
26
|
+
/** The list of the candidate's professional experiences. */
|
|
27
|
+
this.professionalExperiences = [];
|
|
28
|
+
/** The list of social network profiles of the candidate. */
|
|
29
|
+
this.socialNetworksUrls = [];
|
|
30
|
+
/** The list of the candidate's interpersonal and communication abilities. */
|
|
31
|
+
this.softSkills = [];
|
|
32
|
+
/** The candidate's last names. */
|
|
33
|
+
this.surnames = [];
|
|
34
|
+
this.address = new standard_1.StringField({
|
|
35
|
+
prediction: rawPrediction["address"],
|
|
36
|
+
pageId: pageId,
|
|
37
|
+
});
|
|
38
|
+
rawPrediction["certificates"] &&
|
|
39
|
+
rawPrediction["certificates"].map((itemPrediction) => this.certificates.push(new resumeV1Certificate_1.ResumeV1Certificate({
|
|
40
|
+
prediction: itemPrediction,
|
|
41
|
+
pageId: pageId,
|
|
42
|
+
})));
|
|
43
|
+
this.documentLanguage = new standard_1.StringField({
|
|
44
|
+
prediction: rawPrediction["document_language"],
|
|
45
|
+
pageId: pageId,
|
|
46
|
+
});
|
|
47
|
+
this.documentType = new standard_1.ClassificationField({
|
|
48
|
+
prediction: rawPrediction["document_type"],
|
|
49
|
+
});
|
|
50
|
+
rawPrediction["education"] &&
|
|
51
|
+
rawPrediction["education"].map((itemPrediction) => this.education.push(new resumeV1Education_1.ResumeV1Education({
|
|
52
|
+
prediction: itemPrediction,
|
|
53
|
+
pageId: pageId,
|
|
54
|
+
})));
|
|
55
|
+
this.emailAddress = new standard_1.StringField({
|
|
56
|
+
prediction: rawPrediction["email_address"],
|
|
57
|
+
pageId: pageId,
|
|
58
|
+
});
|
|
59
|
+
rawPrediction["given_names"] &&
|
|
60
|
+
rawPrediction["given_names"].map((itemPrediction) => this.givenNames.push(new standard_1.StringField({
|
|
61
|
+
prediction: itemPrediction,
|
|
62
|
+
pageId: pageId,
|
|
63
|
+
})));
|
|
64
|
+
rawPrediction["hard_skills"] &&
|
|
65
|
+
rawPrediction["hard_skills"].map((itemPrediction) => this.hardSkills.push(new standard_1.StringField({
|
|
66
|
+
prediction: itemPrediction,
|
|
67
|
+
pageId: pageId,
|
|
68
|
+
})));
|
|
69
|
+
this.jobApplied = new standard_1.StringField({
|
|
70
|
+
prediction: rawPrediction["job_applied"],
|
|
71
|
+
pageId: pageId,
|
|
72
|
+
});
|
|
73
|
+
rawPrediction["languages"] &&
|
|
74
|
+
rawPrediction["languages"].map((itemPrediction) => this.languages.push(new resumeV1Language_1.ResumeV1Language({
|
|
75
|
+
prediction: itemPrediction,
|
|
76
|
+
pageId: pageId,
|
|
77
|
+
})));
|
|
78
|
+
this.nationality = new standard_1.StringField({
|
|
79
|
+
prediction: rawPrediction["nationality"],
|
|
80
|
+
pageId: pageId,
|
|
81
|
+
});
|
|
82
|
+
this.phoneNumber = new standard_1.StringField({
|
|
83
|
+
prediction: rawPrediction["phone_number"],
|
|
84
|
+
pageId: pageId,
|
|
85
|
+
});
|
|
86
|
+
this.profession = new standard_1.StringField({
|
|
87
|
+
prediction: rawPrediction["profession"],
|
|
88
|
+
pageId: pageId,
|
|
89
|
+
});
|
|
90
|
+
rawPrediction["professional_experiences"] &&
|
|
91
|
+
rawPrediction["professional_experiences"].map((itemPrediction) => this.professionalExperiences.push(new resumeV1ProfessionalExperience_1.ResumeV1ProfessionalExperience({
|
|
92
|
+
prediction: itemPrediction,
|
|
93
|
+
pageId: pageId,
|
|
94
|
+
})));
|
|
95
|
+
rawPrediction["social_networks_urls"] &&
|
|
96
|
+
rawPrediction["social_networks_urls"].map((itemPrediction) => this.socialNetworksUrls.push(new resumeV1SocialNetworksUrl_1.ResumeV1SocialNetworksUrl({
|
|
97
|
+
prediction: itemPrediction,
|
|
98
|
+
pageId: pageId,
|
|
99
|
+
})));
|
|
100
|
+
rawPrediction["soft_skills"] &&
|
|
101
|
+
rawPrediction["soft_skills"].map((itemPrediction) => this.softSkills.push(new standard_1.StringField({
|
|
102
|
+
prediction: itemPrediction,
|
|
103
|
+
pageId: pageId,
|
|
104
|
+
})));
|
|
105
|
+
rawPrediction["surnames"] &&
|
|
106
|
+
rawPrediction["surnames"].map((itemPrediction) => this.surnames.push(new standard_1.StringField({
|
|
107
|
+
prediction: itemPrediction,
|
|
108
|
+
pageId: pageId,
|
|
109
|
+
})));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Default string representation.
|
|
113
|
+
*/
|
|
114
|
+
toString() {
|
|
115
|
+
const givenNames = this.givenNames.join("\n ");
|
|
116
|
+
const surnames = this.surnames.join("\n ");
|
|
117
|
+
let socialNetworksUrlsSummary = "";
|
|
118
|
+
if (this.socialNetworksUrls && this.socialNetworksUrls.length > 0) {
|
|
119
|
+
const socialNetworksUrlsColSizes = [22, 52];
|
|
120
|
+
socialNetworksUrlsSummary += "\n" + (0, common_1.lineSeparator)(socialNetworksUrlsColSizes, "-") + "\n ";
|
|
121
|
+
socialNetworksUrlsSummary += "| Name ";
|
|
122
|
+
socialNetworksUrlsSummary += "| URL ";
|
|
123
|
+
socialNetworksUrlsSummary += "|\n" + (0, common_1.lineSeparator)(socialNetworksUrlsColSizes, "=");
|
|
124
|
+
socialNetworksUrlsSummary += this.socialNetworksUrls.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(socialNetworksUrlsColSizes, "-")).join("");
|
|
125
|
+
}
|
|
126
|
+
let languagesSummary = "";
|
|
127
|
+
if (this.languages && this.languages.length > 0) {
|
|
128
|
+
const languagesColSizes = [10, 22];
|
|
129
|
+
languagesSummary += "\n" + (0, common_1.lineSeparator)(languagesColSizes, "-") + "\n ";
|
|
130
|
+
languagesSummary += "| Language ";
|
|
131
|
+
languagesSummary += "| Level ";
|
|
132
|
+
languagesSummary += "|\n" + (0, common_1.lineSeparator)(languagesColSizes, "=");
|
|
133
|
+
languagesSummary += this.languages.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(languagesColSizes, "-")).join("");
|
|
134
|
+
}
|
|
135
|
+
const hardSkills = this.hardSkills.join("\n ");
|
|
136
|
+
const softSkills = this.softSkills.join("\n ");
|
|
137
|
+
let educationSummary = "";
|
|
138
|
+
if (this.education && this.education.length > 0) {
|
|
139
|
+
const educationColSizes = [17, 27, 11, 10, 27, 13, 12];
|
|
140
|
+
educationSummary += "\n" + (0, common_1.lineSeparator)(educationColSizes, "-") + "\n ";
|
|
141
|
+
educationSummary += "| Domain ";
|
|
142
|
+
educationSummary += "| Degree ";
|
|
143
|
+
educationSummary += "| End Month ";
|
|
144
|
+
educationSummary += "| End Year ";
|
|
145
|
+
educationSummary += "| School ";
|
|
146
|
+
educationSummary += "| Start Month ";
|
|
147
|
+
educationSummary += "| Start Year ";
|
|
148
|
+
educationSummary += "|\n" + (0, common_1.lineSeparator)(educationColSizes, "=");
|
|
149
|
+
educationSummary += this.education.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(educationColSizes, "-")).join("");
|
|
150
|
+
}
|
|
151
|
+
let professionalExperiencesSummary = "";
|
|
152
|
+
if (this.professionalExperiences && this.professionalExperiences.length > 0) {
|
|
153
|
+
const professionalExperiencesColSizes = [17, 12, 27, 11, 10, 22, 13, 12];
|
|
154
|
+
professionalExperiencesSummary += "\n" + (0, common_1.lineSeparator)(professionalExperiencesColSizes, "-") + "\n ";
|
|
155
|
+
professionalExperiencesSummary += "| Contract Type ";
|
|
156
|
+
professionalExperiencesSummary += "| Department ";
|
|
157
|
+
professionalExperiencesSummary += "| Employer ";
|
|
158
|
+
professionalExperiencesSummary += "| End Month ";
|
|
159
|
+
professionalExperiencesSummary += "| End Year ";
|
|
160
|
+
professionalExperiencesSummary += "| Role ";
|
|
161
|
+
professionalExperiencesSummary += "| Start Month ";
|
|
162
|
+
professionalExperiencesSummary += "| Start Year ";
|
|
163
|
+
professionalExperiencesSummary += "|\n" + (0, common_1.lineSeparator)(professionalExperiencesColSizes, "=");
|
|
164
|
+
professionalExperiencesSummary += this.professionalExperiences.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(professionalExperiencesColSizes, "-")).join("");
|
|
165
|
+
}
|
|
166
|
+
let certificatesSummary = "";
|
|
167
|
+
if (this.certificates && this.certificates.length > 0) {
|
|
168
|
+
const certificatesColSizes = [12, 32, 27, 6];
|
|
169
|
+
certificatesSummary += "\n" + (0, common_1.lineSeparator)(certificatesColSizes, "-") + "\n ";
|
|
170
|
+
certificatesSummary += "| Grade ";
|
|
171
|
+
certificatesSummary += "| Name ";
|
|
172
|
+
certificatesSummary += "| Provider ";
|
|
173
|
+
certificatesSummary += "| Year ";
|
|
174
|
+
certificatesSummary += "|\n" + (0, common_1.lineSeparator)(certificatesColSizes, "=");
|
|
175
|
+
certificatesSummary += this.certificates.map((item) => "\n " + item.toTableLine() + "\n" + (0, common_1.lineSeparator)(certificatesColSizes, "-")).join("");
|
|
176
|
+
}
|
|
177
|
+
const outStr = `:Document Language: ${this.documentLanguage}
|
|
178
|
+
:Document Type: ${this.documentType}
|
|
179
|
+
:Given Names: ${givenNames}
|
|
180
|
+
:Surnames: ${surnames}
|
|
181
|
+
:Nationality: ${this.nationality}
|
|
182
|
+
:Email Address: ${this.emailAddress}
|
|
183
|
+
:Phone Number: ${this.phoneNumber}
|
|
184
|
+
:Address: ${this.address}
|
|
185
|
+
:Social Networks: ${socialNetworksUrlsSummary}
|
|
186
|
+
:Profession: ${this.profession}
|
|
187
|
+
:Job Applied: ${this.jobApplied}
|
|
188
|
+
:Languages: ${languagesSummary}
|
|
189
|
+
:Hard Skills: ${hardSkills}
|
|
190
|
+
:Soft Skills: ${softSkills}
|
|
191
|
+
:Education: ${educationSummary}
|
|
192
|
+
:Professional Experiences: ${professionalExperiencesSummary}
|
|
193
|
+
:Certificates: ${certificatesSummary}`.trimEnd();
|
|
194
|
+
return (0, common_1.cleanOutString)(outStr);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.ResumeV1Document = ResumeV1Document;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StringDict } from "../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* The list of the candidate's educational background.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ResumeV1Education {
|
|
7
|
+
#private;
|
|
8
|
+
/** The area of study or specialization. */
|
|
9
|
+
degreeDomain: string | undefined;
|
|
10
|
+
/** The type of degree obtained, such as Bachelor's, Master's, or Doctorate. */
|
|
11
|
+
degreeType: string | undefined;
|
|
12
|
+
/** The month when the education program or course was completed. */
|
|
13
|
+
endMonth: string | undefined;
|
|
14
|
+
/** The year when the education program or course was completed. */
|
|
15
|
+
endYear: string | undefined;
|
|
16
|
+
/** The name of the school. */
|
|
17
|
+
school: string | undefined;
|
|
18
|
+
/** The month when the education program or course began. */
|
|
19
|
+
startMonth: string | undefined;
|
|
20
|
+
/** The year when the education program or course began. */
|
|
21
|
+
startYear: string | undefined;
|
|
22
|
+
/** Confidence score */
|
|
23
|
+
confidence: number;
|
|
24
|
+
/** The document page on which the information was found. */
|
|
25
|
+
pageId: number;
|
|
26
|
+
/**
|
|
27
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
28
|
+
* the field in the document.
|
|
29
|
+
*/
|
|
30
|
+
polygon: Polygon;
|
|
31
|
+
constructor({ prediction }: StringDict);
|
|
32
|
+
/**
|
|
33
|
+
* Default string representation.
|
|
34
|
+
*/
|
|
35
|
+
toString(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
38
|
+
*/
|
|
39
|
+
toTableLine(): string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _ResumeV1Education_instances, _ResumeV1Education_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ResumeV1Education = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* The list of the candidate's educational background.
|
|
12
|
+
*/
|
|
13
|
+
class ResumeV1Education {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_ResumeV1Education_instances.add(this);
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
this.confidence = 0.0;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
this.polygon = [];
|
|
23
|
+
this.degreeDomain = prediction["degree_domain"];
|
|
24
|
+
this.degreeType = prediction["degree_type"];
|
|
25
|
+
this.endMonth = prediction["end_month"];
|
|
26
|
+
this.endYear = prediction["end_year"];
|
|
27
|
+
this.school = prediction["school"];
|
|
28
|
+
this.startMonth = prediction["start_month"];
|
|
29
|
+
this.startYear = prediction["start_year"];
|
|
30
|
+
this.pageId = prediction["page_id"];
|
|
31
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
32
|
+
if (prediction["polygon"]) {
|
|
33
|
+
this.polygon = prediction.polygon;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default string representation.
|
|
38
|
+
*/
|
|
39
|
+
toString() {
|
|
40
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Education_instances, "m", _ResumeV1Education_printableValues).call(this);
|
|
41
|
+
return ("Domain: " +
|
|
42
|
+
printable.degreeDomain +
|
|
43
|
+
", Degree: " +
|
|
44
|
+
printable.degreeType +
|
|
45
|
+
", End Month: " +
|
|
46
|
+
printable.endMonth +
|
|
47
|
+
", End Year: " +
|
|
48
|
+
printable.endYear +
|
|
49
|
+
", School: " +
|
|
50
|
+
printable.school +
|
|
51
|
+
", Start Month: " +
|
|
52
|
+
printable.startMonth +
|
|
53
|
+
", Start Year: " +
|
|
54
|
+
printable.startYear);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
58
|
+
*/
|
|
59
|
+
toTableLine() {
|
|
60
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Education_instances, "m", _ResumeV1Education_printableValues).call(this);
|
|
61
|
+
return ("| " +
|
|
62
|
+
printable.degreeDomain.padEnd(15) +
|
|
63
|
+
" | " +
|
|
64
|
+
printable.degreeType.padEnd(25) +
|
|
65
|
+
" | " +
|
|
66
|
+
printable.endMonth.padEnd(9) +
|
|
67
|
+
" | " +
|
|
68
|
+
printable.endYear.padEnd(8) +
|
|
69
|
+
" | " +
|
|
70
|
+
printable.school.padEnd(25) +
|
|
71
|
+
" | " +
|
|
72
|
+
printable.startMonth.padEnd(11) +
|
|
73
|
+
" | " +
|
|
74
|
+
printable.startYear.padEnd(10) +
|
|
75
|
+
" |");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.ResumeV1Education = ResumeV1Education;
|
|
79
|
+
_ResumeV1Education_instances = new WeakSet(), _ResumeV1Education_printableValues = function _ResumeV1Education_printableValues() {
|
|
80
|
+
return {
|
|
81
|
+
degreeDomain: this.degreeDomain ?
|
|
82
|
+
this.degreeDomain.length <= 15 ?
|
|
83
|
+
this.degreeDomain :
|
|
84
|
+
this.degreeDomain.slice(0, 12) + "..." :
|
|
85
|
+
"",
|
|
86
|
+
degreeType: this.degreeType ?
|
|
87
|
+
this.degreeType.length <= 25 ?
|
|
88
|
+
this.degreeType :
|
|
89
|
+
this.degreeType.slice(0, 22) + "..." :
|
|
90
|
+
"",
|
|
91
|
+
endMonth: this.endMonth ?
|
|
92
|
+
this.endMonth.length <= 9 ?
|
|
93
|
+
this.endMonth :
|
|
94
|
+
this.endMonth.slice(0, 6) + "..." :
|
|
95
|
+
"",
|
|
96
|
+
endYear: this.endYear ?
|
|
97
|
+
this.endYear.length <= 8 ?
|
|
98
|
+
this.endYear :
|
|
99
|
+
this.endYear.slice(0, 5) + "..." :
|
|
100
|
+
"",
|
|
101
|
+
school: this.school ?
|
|
102
|
+
this.school.length <= 25 ?
|
|
103
|
+
this.school :
|
|
104
|
+
this.school.slice(0, 22) + "..." :
|
|
105
|
+
"",
|
|
106
|
+
startMonth: this.startMonth ?
|
|
107
|
+
this.startMonth.length <= 11 ?
|
|
108
|
+
this.startMonth :
|
|
109
|
+
this.startMonth.slice(0, 8) + "..." :
|
|
110
|
+
"",
|
|
111
|
+
startYear: this.startYear ?
|
|
112
|
+
this.startYear.length <= 10 ?
|
|
113
|
+
this.startYear :
|
|
114
|
+
this.startYear.slice(0, 7) + "..." :
|
|
115
|
+
"",
|
|
116
|
+
};
|
|
117
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StringDict } from "../../parsing/common";
|
|
2
|
+
import { Polygon } from "../../geometry";
|
|
3
|
+
/**
|
|
4
|
+
* The list of languages that the candidate is proficient in.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ResumeV1Language {
|
|
7
|
+
#private;
|
|
8
|
+
/** The language's ISO 639 code. */
|
|
9
|
+
language: string | undefined;
|
|
10
|
+
/** The candidate's level for the language. */
|
|
11
|
+
level: string | undefined;
|
|
12
|
+
/** Confidence score */
|
|
13
|
+
confidence: number;
|
|
14
|
+
/** The document page on which the information was found. */
|
|
15
|
+
pageId: number;
|
|
16
|
+
/**
|
|
17
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
18
|
+
* the field in the document.
|
|
19
|
+
*/
|
|
20
|
+
polygon: Polygon;
|
|
21
|
+
constructor({ prediction }: StringDict);
|
|
22
|
+
/**
|
|
23
|
+
* Default string representation.
|
|
24
|
+
*/
|
|
25
|
+
toString(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
28
|
+
*/
|
|
29
|
+
toTableLine(): string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var _ResumeV1Language_instances, _ResumeV1Language_printableValues;
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ResumeV1Language = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* The list of languages that the candidate is proficient in.
|
|
12
|
+
*/
|
|
13
|
+
class ResumeV1Language {
|
|
14
|
+
constructor({ prediction = {} }) {
|
|
15
|
+
_ResumeV1Language_instances.add(this);
|
|
16
|
+
/** Confidence score */
|
|
17
|
+
this.confidence = 0.0;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
20
|
+
* the field in the document.
|
|
21
|
+
*/
|
|
22
|
+
this.polygon = [];
|
|
23
|
+
this.language = prediction["language"];
|
|
24
|
+
this.level = prediction["level"];
|
|
25
|
+
this.pageId = prediction["page_id"];
|
|
26
|
+
this.confidence = prediction["confidence"] ? prediction.confidence : 0.0;
|
|
27
|
+
if (prediction["polygon"]) {
|
|
28
|
+
this.polygon = prediction.polygon;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Default string representation.
|
|
33
|
+
*/
|
|
34
|
+
toString() {
|
|
35
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Language_instances, "m", _ResumeV1Language_printableValues).call(this);
|
|
36
|
+
return ("Language: " +
|
|
37
|
+
printable.language +
|
|
38
|
+
", Level: " +
|
|
39
|
+
printable.level);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Output in a format suitable for inclusion in an rST table.
|
|
43
|
+
*/
|
|
44
|
+
toTableLine() {
|
|
45
|
+
const printable = __classPrivateFieldGet(this, _ResumeV1Language_instances, "m", _ResumeV1Language_printableValues).call(this);
|
|
46
|
+
return ("| " +
|
|
47
|
+
printable.language.padEnd(8) +
|
|
48
|
+
" | " +
|
|
49
|
+
printable.level.padEnd(20) +
|
|
50
|
+
" |");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ResumeV1Language = ResumeV1Language;
|
|
54
|
+
_ResumeV1Language_instances = new WeakSet(), _ResumeV1Language_printableValues = function _ResumeV1Language_printableValues() {
|
|
55
|
+
return {
|
|
56
|
+
language: this.language ?
|
|
57
|
+
this.language.length <= 8 ?
|
|
58
|
+
this.language :
|
|
59
|
+
this.language.slice(0, 5) + "..." :
|
|
60
|
+
"",
|
|
61
|
+
level: this.level ?
|
|
62
|
+
this.level.length <= 20 ?
|
|
63
|
+
this.level :
|
|
64
|
+
this.level.slice(0, 17) + "..." :
|
|
65
|
+
"",
|
|
66
|
+
};
|
|
67
|
+
};
|