struct QT::PosTag

Defined in:

core/pos_tag.cr
core/pos_tag/1-nominals.cr
core/pos_tag/11-specials.cr
core/pos_tag/12-unsorted.cr
core/pos_tag/2-adjectives.cr
core/pos_tag/3-verbals.cr
core/pos_tag/3-vmodals.cr
core/pos_tag/4-numerals.cr
core/pos_tag/5-pronouns.cr
core/pos_tag/6-adverbs.cr
core/pos_tag/8-auxiliary.cr
core/pos_tag/8-preposes.cr
core/pos_tag/8-suffixes.cr
core/pos_tag/9-punctuation.cr
core/pos_tag/_pos.cr

Constant Summary

AdjHao = new(Tag::AdjHao, Pos::Adjective | Pos::Specials)
Adjt = new(Tag::Adjt, Pos::Adjective)
AdjtClause = new(Tag::AdjtClause, Pos::None)
AdjtPhrase = new(Tag::AdjtPhrase, Pos::Verbal)
ADJTS = { {"a", "Adjt", Pos::Adjective}, {"an", "Ajno", (Pos::Polysemy | Pos::Adjective) | Pos::Nominal}, {"ad", "Ajad", (Pos::Polysemy | Pos::Adjective) | Pos::Adverbial}, {"al", "Aform", Pos::Adjective}, {"ab", "Modi", Pos::Adjective} }
AdvBu4 = new(Tag::AdvBu4, Pos::Adverbial)
Adverb = new(Tag::Adverb, Pos::Adverbial)
AdvFei = new(Tag::AdvFei, Pos::Adverbial)
AdvMei = new(Tag::AdvMei, Pos::Adverbial)
AdvNoun = new(Tag::AdvNoun, (Pos::Polysemy | Pos::Nominal) | Pos::Adverbial)
AdvUniq = new(Tag::AdvUniq, (Pos::Polysemy | Pos::Nominal) | Pos::Adverbial)
Aform = new(Tag::Aform, Pos::Adjective)
Ajad = new(Tag::Ajad, (Pos::Polysemy | Pos::Adjective) | Pos::Adverbial)
Ajno = new(Tag::Ajno, (Pos::Polysemy | Pos::Adjective) | Pos::Nominal)
Auxil = new(Tag::Auxil, Pos::None)
AUXILS = { {"Uzhi", ["之"]}, {"Uzhe", ["着"]}, {"Ule", ["了", "喽"]}, {"Uguo", ["过"]}, {"Ude1", ["的", "底"]}, {"Ude2", ["地"]}, {"Ude3", ["得"]}, {"Usuo", ["所"]}, {"Udeng", ["等", "等等", "云云"]}, {"Uyy", ["一样", "一般", "似的", "般"]}, {"Udh", ["的话"]}, {"Uls", ["来讲", "来说", "而言", "说来"]}, {"Ulian", ["连"]} }
Btitle = new(Tag::Btitle, Pos::Nominal | Pos::Names)
Concoord = new(Tag::Concoord, Pos::None)
Conjunct = new(Tag::Conjunct, Pos::None)
CTB = {AD: Adverb, BA: PreBa3, CC: Concoord, CS: Conjunct, DEV: Ude2, DER: Ude3, ETC: Udeng, EM: Fixstr, FW: Litstr, IJ: Exclam, JJ: Modi, LB: PreBei, SB: PreBei, LC: Locat, NOI: Unkn, NT: Ntime, VA: Adjt, URL: Urlstr, ON: Onomat, SP: Mopart, VC: VShi, VE: VYou}
DefnPhrase = new(Tag::DefnPhrase, Pos::None)
DEMPOS = Pos::ProDems | Pos::Pronouns

指示代词 - demonstrative pronoun - đại từ chỉ thị

Exclam = new(Tag::Exclam, Pos::None)
Fixstr = new(Tag::Fixstr, Pos::Strings)
Honor = new(Tag::Honor, Pos::Nominal | Pos::Human)
Idiom = new(Tag::Idiom, Pos::None)
INTPOS = Pos::ProInts | Pos::Pronouns

疑问代词 - interrogative pronoun - đại từ nghi vấn

Litstr = new(Tag::Litstr, Pos::Strings)
Locat = new(Tag::Locat, Pos::Nominal)
MISCS = { {"i", "Idiom", Pos::None}, {"x", "Litstr", Pos::Strings}, {"xl", "Urlstr", Pos::Strings}, {"xx", "Fixstr", Pos::Strings}, {"xe", "Exclam", Pos::None}, {"xy", "Mopart", Pos::None}, {"xo", "Onomat", Pos::None}, {"c", "Conjunct", Pos::None}, {"cc", "Concoord", Pos::None}, {"~vp", "VerbPhrase", Pos::Verbal}, {"~ap", "AdjtPhrase", Pos::Verbal}, {"~np", "NounPhrase", Pos::Nominal}, {"~dp", "DefnPhrase", Pos::None}, {"~pn", "PrepClause", Pos::None}, {"~sv", "VerbClause", Pos::None}, {"~sa", "AdjtClause", Pos::None} }
Modi = new(Tag::Modi, Pos::Adjective)
Mopart = new(Tag::Mopart, Pos::None)
Nabst = new(Tag::Nabst, Pos::Nominal)
Naffil = new(Tag::Naffil, Pos::Nominal | Pos::Names)
NAMES = { {"Nr", "Person", (Pos::Nominal | Pos::Human) | Pos::Names}, {"Na", "Naffil", Pos::Nominal | Pos::Names}, {"Nl", "Nlabel", Pos::Nominal | Pos::Names}, {"Nw", "Btitle", Pos::Nominal | Pos::Names}, {"Nz", "Nother", Pos::Nominal | Pos::Names} }
Nattr = new(Tag::Nattr, Pos::Nominal)
NB_POS = Pos::Numbers | Pos::Numeral

数词 - numeral - số từ

Ndigit = new(Tag::Ndigit, NB_POS)
Nform = new(Tag::Nform, Pos::Nominal)
Nhanzi = new(Tag::Nhanzi, NB_POS)
Nlabel = new(Tag::Nlabel, Pos::Nominal | Pos::Names)
Nlive = new(Tag::Nlive, Pos::Nominal)
Nobjt = new(Tag::Nobjt, Pos::Nominal)
None = new(Tag::None, Pos::Puncts)
Nother = new(Tag::Nother, Pos::Nominal | Pos::Names)
Noun = new(Tag::Noun, Pos::Nominal)
NounPhrase = new(Tag::NounPhrase, Pos::Nominal)
NOUNS = { {"n", "Noun", Pos::Nominal}, {"nl", "Nform", Pos::Nominal}, {"nh", "Honor", Pos::Nominal | Pos::Human}, {"ns", "Posit", Pos::Nominal}, {"nf", "Locat", Pos::Nominal}, {"nt", "Ntime", Pos::Nominal}, {"na", "Nattr", Pos::Nominal}, {"nv", "Nlive", Pos::Nominal}, {"no", "Nobjt", Pos::Nominal}, {"nc", "Nabst", Pos::Nominal} }
NQ_POS = Pos::Nquants | Pos::Numeral

数量词 - numeral and quantifier - số lượng từ

Nqiffy = new(Tag::Nqiffy, NQ_POS)
Nqnoun = new(Tag::Nqnoun, NQ_POS | Pos::Nominal)
Nqtime = new(Tag::Nqtime, NQ_POS | Pos::Nominal)
Nqverb = new(Tag::Nqverb, NQ_POS)
Ntime = new(Tag::Ntime, Pos::Nominal)
Number = new(Tag::Number, NB_POS)
NUMCHR_RE = /[零〇一二两三四五六七八九十百千万亿兆多每]/
NUMHAN_RE = /^[零〇一二两三四五六七八九十百千万亿兆]+$/
NUMLAT_RE = /^[0-90-9]+$/
Onomat = new(Tag::Onomat, Pos::None)
ParenExpr = new(Tag::ParenExpr, Pos::None)
Person = new(Tag::Person, (Pos::Nominal | Pos::Human) | Pos::Names)
Posit = new(Tag::Posit, Pos::Nominal)
Postpos = new(Tag::Postpos, Pos::None)
PreBa3 = new(Tag::PreBa3, Pos::Preposes)
PreBei = new(Tag::PreBei, Pos::Preposes)
PreBi3 = new(Tag::PreBi3, Pos::Preposes)
PreDui = new(Tag::PreDui, Pos::Preposes)
PrepClause = new(Tag::PrepClause, Pos::None)
Prepos = new(Tag::Prepos, Pos::Preposes)
PreZai = new(Tag::PreZai, Pos::Preposes)
ProDem = new(Tag::ProDem, DEMPOS)
ProInt = new(Tag::ProInt, INTPOS)
ProJi = new(Tag::ProJi, DEMPOS)
ProNa1 = new(Tag::ProNa1, DEMPOS)
ProNa2 = new(Tag::ProNa2, INTPOS)
ProPer = new(Tag::ProPer, Pos::Human | PROPOS)

人称代词 - personal pronoun - đại từ nhân xưng

PROPOS = Pos::Pronouns
ProUkn = new(Tag::ProUkn, PROPOS | Pos::Nominal)

代词 - pronoun - đại từ chưa phân loại

ProZhe = new(Tag::ProZhe, DEMPOS)
Punct = new(Tag::Punct, Pos::Puncts)
PUNCTS = { {"Middot", Pos::Puncts, {"・", "‧", "•", "·"}}, {"Comma", Pos::Puncts, {"﹐", ",", ","}}, {"Penum", Pos::Puncts, {"﹑", "、", "、"}}, {"Colon", Pos::Puncts, {"︰", "∶", "﹕", ":", ":"}}, {"Ellip", Pos::Puncts, {"⋯", "…", "···", "...", "....", ".....", "......"}}, {"Pdash", Pos::Puncts, {"-", "—", "--", "---"}}, {"Pdeci", Pos::Puncts, {"."}}, {"Pstop", Pos::Pstops | Pos::Puncts, {"。", "。", "."}}, {"Exmark", Pos::Pstops | Pos::Puncts, {"!", "﹗", "!"}}, {"Qsmark", Pos::Pstops | Pos::Puncts, {"?", "﹖", "?"}}, {"Atsign", Pos::Puncts, {"@", "﹫", "@"}}, {"Smcln", Pos::Pstops | Pos::Puncts, {";", "﹔", ";"}}, {"Tilde", Pos::Puncts, {"~", "~"}}, {"Plsgn", Pos::Puncts, {"﹢", "+", "+"}}, {"Mnsgn", Pos::Puncts, {"﹣", "-"}}, {"Perct", Pos::Puncts | Pos::Quantis, {"%", "﹪", "‰", "%"}}, {"Squanti", Pos::Quantis | Pos::Puncts, {"¥", "﹩", "$", "$", "£", "°", "℃"}}, {"Quoteop", Pos::Popens | Pos::Puncts, {"『", "「", "“", "‘"}}, {"Quotecl", Pos::Pstops | Pos::Puncts, {"』", "”", "」", "’"}}, {"Parenop", Pos::Popens | Pos::Puncts, {"⦅", "(", "﹙", "(", "〔"}}, {"Parencl", Pos::Pstops | Pos::Puncts, {"⦆", "﹚", ")", "〕", ")"}}, {"Brackop", Pos::Popens | Pos::Puncts, {"﹝", "[", "[", "【", "〖", "{", "﹛", "{"}}, {"Brackcl", Pos::Pstops | Pos::Puncts, {"﹞", "]", "】", "〗", "]", "﹜", "}", "}"}}, {"Titleop", Pos::Popens | Pos::Puncts, {"《", "〈", "⟨"}}, {"Titlecl", Pos::Pstops | Pos::Puncts, {"》", "〉", "⟩"}} }
QT_POS = Pos::Quantis | Pos::Numeral

量词 - quantifier - lượng từ

Qtnoun = new(Tag::Qtnoun, QT_POS | Pos::Nominal)
Qttime = new(Tag::Qttime, QT_POS | Pos::Nominal)
Qtverb = new(Tag::Qtverb, QT_POS)
Quotecl = new(Tag::Quotecl, Pos.flags(Pstops, Puncts))
Quoteop = new(Tag::Quoteop, Pos.flags(Popens, Puncts))
Special = new(Tag::Special, Pos::Specials)
SufAdjt = new(Tag::SufAdjt, Pos::Suffixes)
Suffix = new(Tag::Suffix, Pos::Suffixes)
SUFFIXES = { {"ka", "SufAdjt", Pos::Suffixes}, {"kn", "SufNoun", Pos::Suffixes}, {"kv", "SufVerb", Pos::Suffixes}, {"k", "Suffix", Pos::Suffixes} }

后缀 - suffix - hậu tố

SufNoun = new(Tag::SufNoun, Pos::Suffixes)
SufVerb = new(Tag::SufVerb, Pos::Suffixes)
TYPES = { {"n", "Noun", Pos::Nominal}, {"nl", "Nform", Pos::Nominal}, {"nh", "Honor", Pos::Nominal | Pos::Human}, {"ns", "Posit", Pos::Nominal}, {"nf", "Locat", Pos::Nominal}, {"nt", "Ntime", Pos::Nominal}, {"na", "Nattr", Pos::Nominal}, {"nv", "Nlive", Pos::Nominal}, {"no", "Nobjt", Pos::Nominal}, {"nc", "Nabst", Pos::Nominal}, {"Nr", "Person", (Pos::Nominal | Pos::Human) | Pos::Names}, {"Na", "Naffil", Pos::Nominal | Pos::Names}, {"Nl", "Nlabel", Pos::Nominal | Pos::Names}, {"Nw", "Btitle", Pos::Nominal | Pos::Names}, {"Nz", "Nother", Pos::Nominal | Pos::Names}, {"v", "Verb", Pos::Verbal}, {"vn", "Veno", (Pos::Polysemy | Pos::Verbal) | Pos::Nominal}, {"vd", "Vead", (Pos::Polysemy | Pos::Verbal) | Pos::Adverbial}, {"vf", "Vdir", Pos::Verbal | Pos::Vdirs}, {"vx", "Vpro", Pos::Verbal}, {"vx", "Vcmp", Pos::Verbal}, {"vi", "Vintr", Pos::Verbal}, {"v2", "V2Obj", Pos::Verbal}, {"vo", "VerbObject", Pos::Verbal}, {"a", "Adjt", Pos::Adjective}, {"an", "Ajno", (Pos::Polysemy | Pos::Adjective) | Pos::Nominal}, {"ad", "Ajad", (Pos::Polysemy | Pos::Adjective) | Pos::Adverbial}, {"al", "Aform", Pos::Adjective}, {"ab", "Modi", Pos::Adjective}, {"ka", "SufAdjt", Pos::Suffixes}, {"kn", "SufNoun", Pos::Suffixes}, {"kv", "SufVerb", Pos::Suffixes}, {"k", "Suffix", Pos::Suffixes}, {"i", "Idiom", Pos::None}, {"x", "Litstr", Pos::Strings}, {"xl", "Urlstr", Pos::Strings}, {"xx", "Fixstr", Pos::Strings}, {"xe", "Exclam", Pos::None}, {"xy", "Mopart", Pos::None}, {"xo", "Onomat", Pos::None}, {"c", "Conjunct", Pos::None}, {"cc", "Concoord", Pos::None}, {"~vp", "VerbPhrase", Pos::Verbal}, {"~ap", "AdjtPhrase", Pos::Verbal}, {"~np", "NounPhrase", Pos::Nominal}, {"~dp", "DefnPhrase", Pos::None}, {"~pn", "PrepClause", Pos::None}, {"~sv", "VerbClause", Pos::None}, {"~sa", "AdjtClause", Pos::None} }
Ude1 = new(Tag::Ude1, Pos::None)
Ude2 = new(Tag::Ude2, Pos::None)
Ude3 = new(Tag::Ude3, Pos::None)
Udeng = new(Tag::Udeng, Pos::None)
Udh = new(Tag::Udh, Pos::None)
Uguo = new(Tag::Uguo, Pos::None)
Ule = new(Tag::Ule, Pos::None)
Ulian = new(Tag::Ulian, Pos::None)
Uls = new(Tag::Uls, Pos::None)
Unkn = new(Tag::Unkn, Pos::None)
Urlstr = new(Tag::Urlstr, Pos::Strings)
Usuo = new(Tag::Usuo, Pos::None)
Uyy = new(Tag::Uyy, Pos::None)
Uzhe = new(Tag::Uzhe, Pos::None)
Uzhi = new(Tag::Uzhi, Pos::None)
V2Obj = new(Tag::V2Obj, Pos::Verbal)
Vcmp = new(Tag::Vcmp, Pos::Verbal)
Vdir = new(Tag::Vdir, Pos::Verbal | Pos::Vdirs)
Vead = new(Tag::Vead, (Pos::Polysemy | Pos::Verbal) | Pos::Adverbial)
Veno = new(Tag::Veno, (Pos::Polysemy | Pos::Verbal) | Pos::Nominal)
Verb = new(Tag::Verb, Pos::Verbal)
VerbClause = new(Tag::VerbClause, Pos::None)
VerbObject = new(Tag::VerbObject, Pos::Verbal)
VerbPhrase = new(Tag::VerbPhrase, Pos::Verbal)
VERBS = { {"v", "Verb", Pos::Verbal}, {"vn", "Veno", (Pos::Polysemy | Pos::Verbal) | Pos::Nominal}, {"vd", "Vead", (Pos::Polysemy | Pos::Verbal) | Pos::Adverbial}, {"vf", "Vdir", Pos::Verbal | Pos::Vdirs}, {"vx", "Vpro", Pos::Verbal}, {"vx", "Vcmp", Pos::Verbal}, {"vi", "Vintr", Pos::Verbal}, {"v2", "V2Obj", Pos::Verbal}, {"vo", "VerbObject", Pos::Verbal} }
Vintr = new(Tag::Vintr, Pos::Verbal)
VmHui = new(Tag::VmHui, VMODPOS)
VmNeng = new(Tag::VmNeng, VMODPOS)
Vmodal = new(Tag::Vmodal, VMODPOS)
VMODPOS = Pos::Vmodals
VmXiang = new(Tag::VmXiang, VMODPOS)
Vpro = new(Tag::Vpro, Pos::Verbal)
VShang = new(Tag::VShang, Pos::Specials)
VShi = new(Tag::VShi, Pos::Verbal | Pos::Specials)
VXia = new(Tag::VXia, Pos::Specials)
VYou = new(Tag::VYou, Pos::Verbal | Pos::Specials)

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(tag : QT::PosTag::Tag = Tag::Unkn, pos : QT::PosTag::Pos = Pos::None) #

[View source]
def self.parse(tag : String, key : String = "") : self #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def self.parse_extra(tag : String) : self #

[View source]
def self.parse_miscs(tag : String) : self #

[View source]
def self.parse_nquant(key : String) : self #

[View source]
def self.parse_number(tag : String, key : String) : self #

[View source]
def self.parse_other(tag : String) : self #

[View source]
def self.parse_quanti(key : String) : self #

[View source]

Class Method Detail

def self.from_numlit(key : String) #

[View source]
def self.map_ctb(tag : String, key : String) #

[View source]
def self.map_ctb_msp(key) #

[View source]
def self.parse_adjt(tag : String, key : String) #

[View source]
def self.parse_adverb(key : String) #

[View source]
def self.parse_auxil(key : String) #

[View source]
def self.parse_name(tag : String) #

[View source]
def self.parse_noun(tag : String) #

[View source]
def self.parse_prepos(key : String) #

[View source]
def self.parse_prodem(key : String) #

[View source]
def self.parse_proint(key : String) #

[View source]
def self.parse_pronoun(tag : String, key : String) #

[View source]
def self.parse_punct(str : String) #

[View source]
def self.parse_special(key : String) #

[View source]
def self.parse_suffix(tag : String) #

[View source]
def self.parse_verb(tag : String, key : String) #

[View source]
def self.parse_vmodal(key : String) #

[View source]

Macro Detail

macro method_missing(call) #

[View source]

Instance Method Detail

def adjective?(*args, **options) #

[View source]
def adjective?(*args, **options, &) #

[View source]
def adverbial?(*args, **options) #

[View source]
def adverbial?(*args, **options, &) #

[View source]
def auxils? #

[View source]
def ends? #

[View source]
def human?(*args, **options) #

[View source]
def human?(*args, **options, &) #

[View source]
def junction? #

[View source]
def names?(*args, **options) #

[View source]
def names?(*args, **options, &) #

[View source]
def nominal?(*args, **options) #

[View source]
def nominal?(*args, **options, &) #

[View source]
def nquants?(*args, **options) #

[View source]
def nquants?(*args, **options, &) #

[View source]
def nqvcpl? #

[View source]
def numbers?(*args, **options) #

[View source]
def numbers?(*args, **options, &) #

[View source]
def numeral?(*args, **options) #

[View source]
def numeral?(*args, **options, &) #

[View source]
def object? #

[View source]
def places? #

[View source]
def polysemy?(*args, **options) #

[View source]
def polysemy?(*args, **options, &) #

[View source]
def popens?(*args, **options) #

[View source]
def popens?(*args, **options, &) #

[View source]
def pos : Pos #

[View source]
def preposes? #

[View source]
def preposes?(*args, **options) #

[View source]
def preposes?(*args, **options, &) #

[View source]
def pro_dems?(*args, **options) #

[View source]
def pro_dems?(*args, **options, &) #

[View source]
def pro_ints?(*args, **options) #

[View source]
def pro_ints?(*args, **options, &) #

[View source]
def pronouns?(*args, **options) #

[View source]
def pronouns?(*args, **options, &) #

[View source]
def property? #

[View source]
def pstops?(*args, **options) #

[View source]
def pstops?(*args, **options, &) #

[View source]
def puncts?(*args, **options) #

[View source]
def puncts?(*args, **options, &) #

[View source]
def quantis?(*args, **options) #

[View source]
def quantis?(*args, **options, &) #

[View source]
def spaces? #

[View source]
def specials?(*args, **options) #

[View source]
def specials?(*args, **options, &) #

[View source]
def strings?(*args, **options) #

[View source]
def strings?(*args, **options, &) #

[View source]
def subject? #

words that can act as noun


[View source]
def suffixes? #

[View source]
def suffixes?(*args, **options) #

[View source]
def suffixes?(*args, **options, &) #

[View source]
def tag : Tag #

[View source]
def to_str #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def vdirs?(*args, **options) #

[View source]
def vdirs?(*args, **options, &) #

[View source]
def verb_no_obj? #

[View source]
def verbal?(*args, **options) #

[View source]
def verbal?(*args, **options, &) #

[View source]
def vmodals?(*args, **options) #

[View source]
def vmodals?(*args, **options, &) #

[View source]