@type ptree() :: map()
@type words() :: [String.t()]
@spec build_ptree(words_list :: words(), ptree :: ptree()) :: ptree()