You've already forked RekomenciBackend
add resume
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from adaptix import DebugTrail, NameStyle, Retort, name_mapping
|
||||
|
||||
from dataset.data_structures import DataSetLine, Salary
|
||||
|
||||
retort = Retort(
|
||||
recipe=[
|
||||
name_mapping(Salary, name_style=NameStyle.CAMEL),
|
||||
],
|
||||
debug_trail=DebugTrail.DISABLE,
|
||||
strict_coercion=False,
|
||||
)
|
||||
|
||||
raw_lines = []
|
||||
with Path("hh_ru_vacancies.jsonlines").open("r", encoding="utf-8") as f:
|
||||
raw_lines = map(json.loads, f.readlines())
|
||||
|
||||
lines = retort.load(raw_lines, list[DataSetLine])
|
||||
f = set()
|
||||
c = 0
|
||||
for line in lines:
|
||||
if c == 1000:
|
||||
break
|
||||
if line.experience:
|
||||
f.add(line.experience)
|
||||
c += 0
|
||||
|
||||
print(f)
|
||||
Reference in New Issue
Block a user