You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which was used in a similar function earlier causes issues in entity_types_map(). This is already anticipated in the comments surrounding this line. Long story short: Earlier, a list of lists was passed to the function (as an object corresponding to el here). Now, el is already a list itself, so does not need to be unlisted. If unlisted, the names of the resulting character vector probably won't match the mapping_vector. In consequence, all entities in the data.table are assigned to the category defined in the argument other.
To address this, I think it would suffice to omit the line quoted above. And instead of type_list in the following chunk, you would use el directly here:
It might be worth considering changing the name of the resulting column in the data.table from "class" to "category" as this wording is indeed unclear.
A similar issue occurs with the "old" map_type_to_class() function. Here, the issue results in a different outcome, assigning all classes to all entities as currently visible in the README. This can be addressed in a similar fashion, but if the function is replaced by entity_types_map() fixing the former seems more important.
The text was updated successfully, but these errors were encountered:
This concerns the version of the package on the
entity_types
branch. The linedbpedia/R/entity_types.R
Line 77 in f4dc779
which was used in a similar function earlier causes issues in
entity_types_map()
. This is already anticipated in the comments surrounding this line. Long story short: Earlier, a list of lists was passed to the function (as an object corresponding toel
here). Now,el
is already a list itself, so does not need to be unlisted. If unlisted, the names of the resulting character vector probably won't match themapping_vector
. In consequence, all entities in the data.table are assigned to the category defined in the argumentother
.To address this, I think it would suffice to omit the line quoted above. And instead of
type_list
in the following chunk, you would useel
directly here:dbpedia/R/entity_types.R
Lines 81 to 87 in f4dc779
Then, the assignment should work as expected.
Two notes here:
map_type_to_class()
function. Here, the issue results in a different outcome, assigning all classes to all entities as currently visible in the README. This can be addressed in a similar fashion, but if the function is replaced byentity_types_map()
fixing the former seems more important.The text was updated successfully, but these errors were encountered: