bjherger / ResumeParser

A framework to parse resumes, extract contact & other information, and check for required terms
367 stars 218 forks source link

Running into a type mismatch error #39

Open StKi2 opened 5 years ago

StKi2 commented 5 years ago

Hi thanks for this package, I was able to resolve dependencies and get it to run, but ran into this:

INFO:root:Begin transform Traceback (most recent call last): File "main.py", line 111, in main() File "main.py", line 39, in main observations, nlp = transform(observations, nlp) File "main.py", line 81, in transform observations['candidate_name'] = observations['text'].apply(lambda x: File "/Library/Python/2.7/site-packages/pandas/core/series.py", line 3591, in apply mapped = lib.map_infer(values, f, convert=convert_dtype) File "pandas/_libs/lib.pyx", line 2217, in pandas._libs.lib.map_infer File "main.py", line 82, in field_extraction.candidate_name_extractor(x, nlp)) File "/Users/vladin/Downloads/ResumeParser-master/bin/field_extraction.py", line 13, in candidate_name_extractor doc = nlp(input_string) File "/Library/Python/2.7/site-packages/spacy/language.py", line 320, in call doc = self.make_doc(text) File "/Library/Python/2.7/site-packages/spacy/language.py", line 293, in self.make_doc = lambda text: self.tokenizer(text) TypeError: Argument 'string' has incorrect type (expected unicode, got str)

noexit12 commented 4 years ago

field_extraction.py // Line 13 change: doc = nlp(input_string) to: doc = nlp(unicode(input_string, 'utf-8'))

Dasuni-Uthpala commented 3 years ago

i'm getting this error when i try to run the package. can anyone help me out?

INFO:root:End extract INFO:root:Begin transform Traceback (most recent call last): File "main.py", line 116, in main() File "main.py", line 39, in main observations, nlp = transform(observations, nlp) File "main.py", line 84, in transform if observations['candidate_name'] == "NOT FOUND": File "C:\Users\Dasuni Uthpala\anaconda3\envs\env37\lib\site-packages\pandas\core\generic.py", line 1478, in nonzero .format(self.class.name)) ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().