Class: Mindee::V1::Product::Resume::ResumeV1Document
- Inherits:
-
Mindee::V1::Parsing::Common::Prediction
- Object
- Mindee::V1::Parsing::Common::Prediction
- Mindee::V1::Product::Resume::ResumeV1Document
- Includes:
- Mindee::V1::Parsing::Standard
- Defined in:
- lib/mindee/v1/product/resume/resume_v1_document.rb
Overview
Resume API version 1.2 document data.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The location information of the candidate, including city, state, and country.
-
#certificates ⇒ Mindee::V1::Product::Resume::ResumeV1Certificates
readonly
The list of certificates obtained by the candidate.
-
#document_language ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The ISO 639 code of the language in which the document is written.
-
#document_type ⇒ Mindee::V1::Parsing::Standard::ClassificationField
readonly
The type of the document sent.
-
#education ⇒ Mindee::V1::Product::Resume::ResumeV1Educations
readonly
The list of the candidate’s educational background.
-
#email_address ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The email address of the candidate.
-
#given_names ⇒ Array<Mindee::V1::Parsing::Standard::StringField>
readonly
The candidate’s first or given names.
-
#hard_skills ⇒ Array<Mindee::V1::Parsing::Standard::StringField>
readonly
The list of the candidate’s technical abilities and knowledge.
-
#job_applied ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The position that the candidate is applying for.
-
#languages ⇒ Mindee::V1::Product::Resume::ResumeV1Languages
readonly
The list of languages that the candidate is proficient in.
-
#nationality ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The ISO 3166 code for the country of citizenship of the candidate.
-
#phone_number ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The phone number of the candidate.
-
#profession ⇒ Mindee::V1::Parsing::Standard::StringField
readonly
The candidate’s current profession.
-
#professional_experiences ⇒ Mindee::V1::Product::Resume::ResumeV1ProfessionalExperiences
readonly
The list of the candidate’s professional experiences.
-
#social_networks_urls ⇒ Mindee::V1::Product::Resume::ResumeV1SocialNetworksUrls
readonly
The list of social network profiles of the candidate.
-
#soft_skills ⇒ Array<Mindee::V1::Parsing::Standard::StringField>
readonly
The list of the candidate’s interpersonal and communication abilities.
-
#surnames ⇒ Array<Mindee::V1::Parsing::Standard::StringField>
readonly
The candidate’s last names.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ ResumeV1Document
constructor
A new instance of ResumeV1Document.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ ResumeV1Document
Returns a new instance of ResumeV1Document.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 72 def initialize(prediction, page_id) super @address = Parsing::Standard::StringField.new( prediction['address'], page_id ) @certificates = Product::Resume::ResumeV1Certificates.new(prediction['certificates'], page_id) @document_language = Parsing::Standard::StringField.new( prediction['document_language'], page_id ) @document_type = Parsing::Standard::ClassificationField.new( prediction['document_type'], page_id ) @education = Product::Resume::ResumeV1Educations.new(prediction['education'], page_id) @email_address = Parsing::Standard::StringField.new( prediction['email_address'], page_id ) @given_names = [] # : Array[Parsing::Standard::StringField] prediction['given_names'].each do |item| @given_names.push(Parsing::Standard::StringField.new(item, page_id)) end @hard_skills = [] # : Array[Parsing::Standard::StringField] prediction['hard_skills'].each do |item| @hard_skills.push(Parsing::Standard::StringField.new(item, page_id)) end @job_applied = Parsing::Standard::StringField.new( prediction['job_applied'], page_id ) @languages = Product::Resume::ResumeV1Languages.new(prediction['languages'], page_id) @nationality = Parsing::Standard::StringField.new( prediction['nationality'], page_id ) @phone_number = Parsing::Standard::StringField.new( prediction['phone_number'], page_id ) @profession = Parsing::Standard::StringField.new( prediction['profession'], page_id ) @professional_experiences = Product::Resume::ResumeV1ProfessionalExperiences.new( prediction['professional_experiences'], page_id ) @social_networks_urls = Product::Resume::ResumeV1SocialNetworksUrls.new( prediction['social_networks_urls'], page_id ) @soft_skills = [] # : Array[Parsing::Standard::StringField] prediction['soft_skills'].each do |item| @soft_skills.push(Parsing::Standard::StringField.new(item, page_id)) end @surnames = [] # : Array[Parsing::Standard::StringField] prediction['surnames'].each do |item| @surnames.push(Parsing::Standard::StringField.new(item, page_id)) end end |
Instance Attribute Details
#address ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The location information of the candidate, including city, state, and country.
20 21 22 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 20 def address @address end |
#certificates ⇒ Mindee::V1::Product::Resume::ResumeV1Certificates (readonly)
The list of certificates obtained by the candidate.
23 24 25 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 23 def certificates @certificates end |
#document_language ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The ISO 639 code of the language in which the document is written.
26 27 28 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 26 def document_language @document_language end |
#document_type ⇒ Mindee::V1::Parsing::Standard::ClassificationField (readonly)
The type of the document sent.
29 30 31 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 29 def document_type @document_type end |
#education ⇒ Mindee::V1::Product::Resume::ResumeV1Educations (readonly)
The list of the candidate’s educational background.
32 33 34 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 32 def education @education end |
#email_address ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The email address of the candidate.
35 36 37 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 35 def email_address @email_address end |
#given_names ⇒ Array<Mindee::V1::Parsing::Standard::StringField> (readonly)
The candidate’s first or given names.
38 39 40 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 38 def given_names @given_names end |
#hard_skills ⇒ Array<Mindee::V1::Parsing::Standard::StringField> (readonly)
The list of the candidate’s technical abilities and knowledge.
41 42 43 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 41 def hard_skills @hard_skills end |
#job_applied ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The position that the candidate is applying for.
44 45 46 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 44 def job_applied @job_applied end |
#languages ⇒ Mindee::V1::Product::Resume::ResumeV1Languages (readonly)
The list of languages that the candidate is proficient in.
47 48 49 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 47 def languages @languages end |
#nationality ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The ISO 3166 code for the country of citizenship of the candidate.
50 51 52 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 50 def nationality @nationality end |
#phone_number ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The phone number of the candidate.
53 54 55 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 53 def phone_number @phone_number end |
#profession ⇒ Mindee::V1::Parsing::Standard::StringField (readonly)
The candidate’s current profession.
56 57 58 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 56 def profession @profession end |
#professional_experiences ⇒ Mindee::V1::Product::Resume::ResumeV1ProfessionalExperiences (readonly)
The list of the candidate’s professional experiences.
59 60 61 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 59 def professional_experiences @professional_experiences end |
#social_networks_urls ⇒ Mindee::V1::Product::Resume::ResumeV1SocialNetworksUrls (readonly)
The list of social network profiles of the candidate.
62 63 64 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 62 def @social_networks_urls end |
#soft_skills ⇒ Array<Mindee::V1::Parsing::Standard::StringField> (readonly)
The list of the candidate’s interpersonal and communication abilities.
65 66 67 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 65 def soft_skills @soft_skills end |
#surnames ⇒ Array<Mindee::V1::Parsing::Standard::StringField> (readonly)
The candidate’s last names.
68 69 70 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 68 def surnames @surnames end |
Instance Method Details
#to_s ⇒ String
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/mindee/v1/product/resume/resume_v1_document.rb', line 134 def to_s given_names = @given_names.join("\n #{' ' * 13}") surnames = @surnames.join("\n #{' ' * 10}") = languages = languages_to_s hard_skills = @hard_skills.join("\n #{' ' * 13}") soft_skills = @soft_skills.join("\n #{' ' * 13}") education = education_to_s professional_experiences = professional_experiences_to_s certificates = certificates_to_s out_str = String.new out_str << "\n:Document Language: #{@document_language}".rstrip out_str << "\n:Document Type: #{@document_type}".rstrip out_str << "\n:Given Names: #{given_names}".rstrip out_str << "\n:Surnames: #{surnames}".rstrip out_str << "\n:Nationality: #{@nationality}".rstrip out_str << "\n:Email Address: #{@email_address}".rstrip out_str << "\n:Phone Number: #{@phone_number}".rstrip out_str << "\n:Address: #{@address}".rstrip out_str << "\n:Social Networks:" out_str << out_str << "\n:Profession: #{@profession}".rstrip out_str << "\n:Job Applied: #{@job_applied}".rstrip out_str << "\n:Languages:" out_str << languages out_str << "\n:Hard Skills: #{hard_skills}".rstrip out_str << "\n:Soft Skills: #{soft_skills}".rstrip out_str << "\n:Education:" out_str << education out_str << "\n:Professional Experiences:" out_str << professional_experiences out_str << "\n:Certificates:" out_str << certificates out_str[1..].to_s end |