% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/to_pinyin.R
\name{add_phrase}
\alias{add_phrase}
\title{Add a Custom Polyphone Phrase}
\usage{
add_phrase(phrase, reading)
}
\arguments{
\item{phrase}{A Chinese character string (e.g. \code{"\\u884c\\u957f"}).}

\item{reading}{The corresponding Pinyin reading as a single string
(e.g. \code{"hang2 zhang3"} or \code{"hang_zhang"}). The separator used here
will be preserved when \code{polyphone = TRUE}.}
}
\value{
Invisibly returns \code{NULL}.
}
\description{
Allows users to extend the built-in phrase table with their own
multi-character phrases and readings.
}
\examples{
add_phrase("\u884c\u957f", "hang2 zhang3")
to_pinyin("\u94f6\u884c\u884c\u957f", polyphone = TRUE)
}
