Skip to content

Commit

Permalink
Actualitza documentació i puja la versió
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaspons committed Jul 17, 2022
1 parent 9f9ffb1 commit 30e4588
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: toponimsCat
Title: Eines per ajudar a afegir l'etiqueta "name:ca" a OpenStreetMap
Version: 0.5
Version: 0.6
Authors@R:
person("Joan", "Maspons", email="[email protected]", role=c("aut", "cre"))
Maintainer: Joan Maspons <[email protected]>
Expand Down
22 changes: 20 additions & 2 deletions R/projecte_LangToolsOSM.R
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,31 @@ generaRevisions_regexTranslations<- function(informes, arrelProjecte, cerca=" \\
#' Base de dades de revisions
#'
#' Genera revisions per casos que només es diferencien per si els noms comencen amb majúscules o minúscules, mantenint el format original.
#' Alerta amb les reutilitzacions entre projectes, a vegades la concordànça del gènere es perd i cal revisar les edicions (p. ex. calle-carrer VS plaza-plaça)
#'
#' @param arrelProjectes camí a partir del qual es cercaran recursivament les revisions fetes.
#'
#' @return Retorna un \code{data.frame} amb totes les revisions fetes que contenen valors per \code{name:ca} o \code{alt_name:ca}.
#' @export
#
# @examples
#'
#' @examples
#' # Reutilitza les revisions pel projecte plaza-plaça
#' bdRevs<- bdRevisions(arrelProjectes="PPCC")
#' bdRevs[, c("name", "alt_name")]<- lapply(bdRevs[, c("name", "alt_name")], function(x){
#' x<- gsub("^(avenida|calle|camino|parque|plaza) ", "plaza ", x)
#' x<- gsub("^(Avenida|Calle|Camino|Parque|Plaza) ", "Plaza ", x)
#' x
#' })
#' bdRevs[, c("name:ca", "alt_name:ca")]<- lapply(bdRevs[, c("name:ca", "alt_name:ca")], function(x){
#' x<- gsub("^(avinguda|carrer|camí|parc|plaça) ", "plaça ", x)
#' x<- gsub("^(Avinguda|Carrer|Camí|Parc|Plaça) ", "Plaça ", x)
#' x
#' })
#'
#' bdRevs<- unique(bdRevs)
#' \dontrun{
#' write.table(bdRevs, "PPCC/plaza-plaça/revisions/FET/revisio-PPCC_reutilitzat_name-plaza.tsv", sep="\t", na="", col.names=TRUE, row.names=FALSE)
#' }
bdRevisions<- function(arrelProjectes){
arrelProjectes<- gsub("/$", "", arrelProjectes) # Normalitza camins per evitar problemes en modificar-los

Expand Down
20 changes: 20 additions & 0 deletions man/bdRevisions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/generaInforme.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/generaInformesPPCC.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/generaRevisions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/preparaEdicions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30e4588

Please sign in to comment.