-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.Rmd
65 lines (46 loc) · 2.65 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# labourR <a href="http://eworx-org.github.io/labourR/" rel="nofollow"><img src='man/figures/logo.png' align="right" height="130"/></a>
<!-- badges: start -->
[![Codecov test coverage](https://codecov.io/gh/AleKoure/labourR/branch/master/graph/badge.svg)](https://codecov.io/gh/eworx-org/labourR?branch=master)
[![R-CMD-check](https://github.com/eworx-org/labourR/workflows/R-CMD-check/badge.svg)](https://github.com/eworx-org/labourR/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/labourR)](https://CRAN.R-project.org/package=labourR)
[![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/labourR?color=green)](https://cran.r-project.org/package=labourR)
<!-- badges: end -->
The goal of labourR is to map multilingual free-text of occupations, such as a job title in a Curriculum Vitae, to hierarchical ontologies provided by [ESCO](https://ec.europa.eu/esco/portal), the multilingual classification of European Skills, Competences, Qualifications and Occupations, and [ISCO](https://ec.europa.eu/esco/portal/escopedia/International_Standard_Classification_of_Occupations__40_ISCO_41_), the International Standard Classification of Occupations.
```{r pressure, echo=FALSE, fig.cap="Fig.1 - ESCO is mapped to the 4th level of the ISCO hierarchical model.", out.width = '80%'}
knitr::include_graphics("man/figures/ESCO_ISCO_hierarchy.png")
```
Computations are vectorised and the `data.table` package is used for high performance and memory efficiency.
See [Articles](https://eworx-org.github.io/labourR/articles/occupations_retrieval.html) section for details.
## Installation
You can install the released version of labourR from [CRAN](https://CRAN.R-project.org) with,
``` r
install.packages("labourR")
```
## Examples
```{r example}
library(labourR)
corpus <- data.frame(
id = 1:3,
text = c("Data Scientist", "Junior Architect Engineer", "Cashier at McDonald's")
)
```
- If the ISCO level is specified, the top suggested ISCO group is returned. `num_leaves` specifies the number of ESCO occupations used for the k-NN classifier to perform a plurality vote,
```{r with_isco_level}
classify_occupation(corpus = corpus, isco_level = 3, lang = "en", num_leaves = 5)
```
- If the ISCO level is not specified, the top num_leaves, in this case 5, suggested ESCO occupations are returned for each id,
```{r without_isco_level}
classify_occupation(corpus = corpus, isco_level = NULL, lang = "en", num_leaves = 5)
```