Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print.dictionary() does not apply fully recursively #1967

Closed
kbenoit opened this issue Jun 10, 2020 · 0 comments
Closed

print.dictionary() does not apply fully recursively #1967

kbenoit opened this issue Jun 10, 2020 · 0 comments
Assignees

Comments

@kbenoit
Copy link
Collaborator

kbenoit commented Jun 10, 2020

The key limits should apply recursively, but are apparently not passed through to nested keys.

library("quanteda")
## Package version: 2.0.9000
## Parallel computing: 2 of 12 threads used.
## See https://quanteda.io for tutorials and examples.
## 
## Attaching package: 'quanteda'
## The following object is masked from 'package:utils':
## 
##     View

dict <- dictionary(file = system.file("extdata", "RID.cat", package = "quanteda"))
print(dict, max_nkey = -1, max_nval = -1)
## Dictionary object with 3 primary key entries and 3 nested levels.
## - [PRIMARY]:
##   - [NEED]:
##     - [ORALITY]:
##       - absinth*, ale, ales, alimentary, ambrosia*, ambrosial*, appetit*, apple*, artichok*, asparagu*, bacon*, banana*, bean*, beef*, beer*, belch*, bellies, belly, berri*, berry*, beverag*, biscuit*, bite*, bite, bites, biting, bitten*, bonbon*, brandy*, bread*, breakfast*, breast*, brew*, broth, burp*, butter*, buttermilk*, cafe, cafes, cake, cakes, cafetaria, candy*, cannibal*, caviar*, champagn*, chees*, cherri*, cherry*, chestnut*, chew*, chok*, cider*, claret*, cob, cobs, cocoa*, cocoanut*, coconut*, coffe*, consum*, cook*, corn*, cough*, cranberry*, cream*, delicaci*, delicacy*, dessert*, devour*, diet*, digest*, dine, dines, dining, dinner*, dish, dishes, drank*, drink*, drunk*, drunken*, eat*, eaten*, egg*, entrail*, famin*, famish*, fast, fasts, fat, fatten*, feast*, fed, feed, feeds, fig, figs, flour*, food*, foodstuff*, fork*, fruit*, garlic*, gin, ginger*, gins, glutton*, gluttonou*, gnaw*, gobbl*, grain*, grap*, grog*, gruel*, gulp*, gum, gums, gut, guts, ham, hams, herb*, honey*, hunger*, hungry*, imbib*, inedibl*, intestin*, jaw*, juic*, lap, laps, lemon*, lick*, lime, limes, lip, lips, liqueur*, liquor*, lunch*, maiz*, meal*, meat*, melon*, menu*, milk*, mint*, morsel*, mouth*, mouthful*, mushroom*, mutton*, naus*, nectar*, nibbl*, nourish*, nourishment*, nurtur*, nut, nuts, oliv*, oral*, palat*, partak*, pastri*, pastry*, pea, peanut*, pear*, peas, pepper*, philtr*, pineappl*, poison*, pork*, porridg*, pot, potato*, potbel*, pots, pucker*, pumpkin*, quench*, raspberry*, raw, rawly, repast*, restaurant*, restaurent*, rice, rices, ripenes*, roast*, rum, rums, salad*, saliva*, salivat*, salt*, sauc*, sauerkraut*, sesam*, sherbert*, sherry*, soup*, spat*, spit*, spittl*, spoon*, starv*, starvat*, stomach*, strawberri*, strawberry*, suck*, suckl*, sugar*, supper*, swallow*, tea, teas, teat*, teeth*, thirst*, thirsty*, throat*, tit, tits, tomato*, tongu*, tooth*, uncook*, veal*, vegetabl*, venison*, vodka*, vomit*, wheat*, whiskey*, whisky*, yam, yams*, yeast*
##     - [ANALITY]:
##       - anal, anus, anuses, arse, arsehol*, asses, ass-hol*, asshol*, beshat*, beshit*, besmear*, bile*, bowel*, buttock*, cack*, cesspool*, cloaca*, clot, clots*, constipat*, dank*, daub*, defacat*, defil*, delous*, diarrhoea*, dirt*, dirty*, disgust*, dung*, dunghill*, effluvia*, effluvium*, enema*, excret*, fart, farts, fecal*, feces, fetid*, fetor*, filth*, filthy*, impur*, latrin*, lice, loathsom*, lous*, maggot*, maggoty*, malodorou*, malodourou*, manur*, mess, messes, messing, miasma*, mud, muddy*, muds, offal*, ooz*, oozy*, outhous*, piss*, pollut*, putrescenc*, putrescent*, putrid*, rancid*, rectum*, reek*, rot, rots, rotten*, rotting, rump*, scum*, sewer*, shat*, shit*, slimy*, smear*, sodomist*, sodomy*, soil*, stal*, stench*, stink*, sweat*, unclean*, unwash*, urin*
##     - [SEX]:
##       - venereal*, adulterer*, adultery*, allur*, bawd*, bawdy*, bitch*, brothel*, caress*, carnal*, circumcis*, clitori*, cohabit*, coitu*, concubin*, copulat*, coquett*, coquettish*, courtesan*, cuckold*, cunt*, cupid*, debauch*, deflower*, ejaculat*, erotic*, fondl*, fornicat*, fuck*, genital*, genitalia*, girdl*, groin*, harem*, harlot*, homosexual*, homosexuality*, immodest*, incest*, incestuou*, indecent*, indiscret*, infatuat*, kiss*, lasciviou*, lecher*, lecherou*, lechery*, leer, leers, lewd*, libertin*, licentiou*, lover*, lust*, lustful*, lusty*, masturbat*, menstrual*, menstruat*, mistres*, naked, nude, nudes, obscen*, obscenity*, orgasm*, orgi*, orgy*, pander*, paramour*, peni*, pervers*, pervert*, phallic*, phallu*, pregnancy*, pregnant*, procreat*, prostitut*, prurient*, puberty*, pubi*, pubic*, rape*, raping*, ribald*, satyr*, seduc*, sensual*, sensuou*, sex, sexed, sexes, sex-linked, sexual*, sexy*, shameles*, slattern*, slut*, slutty*, testi*, testicl*, thigh*, trollop*, unblush*, undres*, vagina*, venu*, voluptuou*, vulva*, waist*, wanton*, whor*, womb*, sensation
##   - [SENSATION]:
##     - [TOUCH]:
##       - brush*, coars*, contact*, cudd*, cuddl*, handl*, itch*, itchy*, massag*, prickl*, rough*, rub, rubb*, rubs, scaly, scratch*, sharp*, slick*, slippery*, smooth*, snuggl*, sting, stings, strok*, textur*, thick*, tickl*, tingl*, touch*, waxy*
##     - [TASTE]:
##       - aftertast*, bitter*, delectabl*, deliciou*, flavor*, gall, honi*, lusciou*, piquant*, savor*, savory*, savour*, savoury*, sour*, spic*, spicy*, sugary*, sweet*, sweetnes*, tang*, tangy*, tart*, tast*, tasty*, toothsom*, unpalatabl*, unsavory*, vinegar*, vinegary*
##     - [ODOR]:
##       - aroma*, aromatic*, breath*, cologn*, fragranc*, fragrant*, fume*, fuming*, incens*, inhal*, musk*, musky*, musty*, nose*, nostril*, odor*, odour*, perfum*, pungenc*, pungent*, scent*, smel*, smell*, snif*, sniff*
##     [ reached max_nkey ... 6 more keys ]
##   - [DEFENSIVE SYMBOL]:
##     - [PASSIVITY]:
##       - stagnant, apathetic*, apathy*, bed, bedd*, beds, boredom*, calm*, contented*, contentment*, couch*, cozy*, dead*, death*, decay*, die, died*, dies, dormant*, drift*, dying*, ease*, eased, eases, hush*, idl*, immobil*, inactiv*, inactivity*, indifferenc*, indifferent*, indolent*, inert*, inertia*, innert*, laid*, lain*, langorou*, languid*, languish*, languor*, lassitud*, lay, laying*, lays, lazy*, leaden*, leisur*, lethargic*, lethargy*, lie, lies, linger*, listles*, lul*, lull*, motionles*, nestl*, nonchalanc*, nonchalant*, passiv*, passivity*, peaceful*, perish*, phlegmatic*, placid*, procrastinat*, quiet*, relax*, relaxat*, repos*, rest*, restful*, retir*, safe, safely, safety*, secur*, security*, sedentary*, seren*, serenity*, silenc*, silent*, slack*, slothful*, slow*, sluggish*, solac*, sooth*, stagnat*, static*, stillnes*, submiss*, submissiv*, submit*, succumb*, tranq*, unhurri*, vagrant*, velleity*, wearisom*, weary*, yield*
##     - [VOYAGE]:
##       - caravan*, chas*, cruis*, desert*, driv*, embark*, emigrat*, explor*, immigrat*, immigrant*, journey*, migrat*, navigat*, nomad*, nomadic*, oscillat*, pilgrim*, pilgrimag*, ride, rides, riding*, roam*, rode, rov*, sail*, sailor*, seafar*, search*, ship*, stray*, tour*, tourist*, travel*, trek*, trip*, vagabond*, voyag*, wander*, wanderlust*, wayfarer*, wildernes*, yonder*
##     - [RANDOM MOVEMENT]:
##       - activiti*, activity*, agitat*, churn*, commot*, convuls*, expand*, expans*, fidget*, flounder*, flurri*, flurry*, jerk*, lurch*, orbit*, pitch*, pivot*, puls*, pulsat*, quak*, quiver*, reel*, revolv*, rol*, roll*, rotat*, seeth*, shak*, shook*, spasm*, spin*, spread*, stagger*, stir*, sway*, swel*, swell*, swivel*, swollen*, throb*, totter*, twich*, twist*, twitch*, undulat*, vibrat*, wave, waved, waves, waving*, whirl*, wobbl*
##     [ reached max_nkey ... 2 more keys ]
##   [ reached max_nkey ... 2 more keys ]
## - [SECONDARY]:
##   - [ABSTRACT THOUGHT]:
##     - diverse, diversification, diversified, diversity, evident, evidential, guess*, logistic, abstract*, almost*, alternativ*, analy*, attribut*, axiom*, basic*, belief*, believ*, calculat*, caus*, certain*, characteriz*, choic*, choos*, chos*, circumstanc*, comprehend*, compar*, comprehens*, conditional*, concentrat*, concept*, conclud*, conjectur*, consequenc*, consequent*, consider*, contriv*, criter*, criteria*, decid*, deem*, defin*, deliberat*, determin*, differenc*, different*, distinct*, distinguish*, doctrin*, effect*, establish*, estimat*, evaluat*, evidenc*, examin*, exampl*, except*, fact, facts, featur*, figur*, forethought*, formulat*, gues*, history*, idea*, importanc*, important*, informat*, interpret*, interpretat*, judg*, judgment*, knew*, know*, learn*, logic*, may, meant*, mistak*, mistaken*, mistook*, model*, opin*, otherwis*, perhap*, plan*, possi*, predicat*, predict*, probab*, probabl*, problem*, proof*, prov*, purpos*, quali*, quant*, re-analy*, re-examin*, rational*, real, reality*, reason*, reasonabl*, reconsider*, reexamin*, reformulat*, reinterpretat*, relearn*, relevanc*, relevant*, research*, resolv*, schem*, scienc*, scientific*, select*, significanc*, solut*, someth*, somewhat*, sourc*, subject*, suppos*, sure, surely, tend*, them*, theor*, think*, thinker*, thought*, topic*, true, truly, truth*, ttt1, understand*, understood*, weigh, weighed*, weighing*, weighs, why
##   - [SOCIAL BEHAVIOR]:
##     - guest*, quota, quota-*, quotas, acquiescence, approbation, consensus*, consult, prosocial, sociable, able*, accept*, acceptanc*, addres*, admit*, advic*, advis*, agre*, aid*, allow*, announc*, answer*, apologis*, apologiz*, appeal*, approv*, approval*, ask, asked, asking, asks, assist*, assur*, bargain*, beckon*, beseech*, borrow*, call*, comment*, commit*, communicat*, conduct*, confer*, confes*, confid*, confirm*, congratulat*, consent*, consol*, consolat*, convers*, conversat*, convinc*, cooperat*, counsel*, declar*, depend*, dependent*, describ*, dialogu*, discours*, discus*, discuss*, donat*, educat*, elect*, encourag*, encouragement*, engag*, escort*, excus*, explain*, follow*, forgav*, forgiv*, forgiven*, generosity*, generou*, gift*, grant*, greet*, guid*, guidanc*, help*, imitat*, implor*, influenc*, inform*, inquir*, instruct*, interview*, introduc*, invit*, kneel*, lend*, lent*, meet*, ment*, messag*, met*, mutual*, offer*, pardon*, participat*, persuad*, persua*, plead*, pleas*, preach*, proclaim*, promis*, propos*, protect*, provid*, quot*, recit*, reeducation, remark*, remind*, repli*, reply, represent*, request*, rescu*, respond*, respons*, said*, sale, sales, say*, servic*, shar*, shelter*, signal*, social*, solicit*, speak*, speaker*, speech*, spok*, spoken*, suggest*, sworn*, talk*, taught*, teach*, tell*, thank*, told*, treat*, utter*, visit*
##   - [INSTRUMENTAL BEHAVIOR]:
##     - avail, caveat*, divestment*, dividend*, foundr*, laborator*, spin-off*, availability, component*, ingredient, logistics, merchandise, provision*, achiev*, achievement*, acquir*, acquisit*, afford*, aim*, applic*, applie*, apply, architect*, assembl*, attain*, attempt*, availabl*, belong*, bid*, bought*, build*, built*, burden*, busines*, buy*, capabl*, carri*, carry*, claim*, collect*, construct*, copi*, copy*, cost*, count*, craft*, craftsman*, cultivat*, cure*, curing*, deliver*, earn*, effort*, employ*, endeavor*, factori*, factory*, feat, feats, find*, finish*, forge, forges, found*, gain*, goal*, grasp*, harvest*, hire, hired, hires, hiring*, improv*, industri*, industry*, job, jobs, labor*, laboriou*, labour*, labouriou*, lesson*, machin*, machinery*, mak*, manipulat*, manufactur*, market*, mend*, merchant*, money*, obtain*, occupat*, occupy*, ownership*, paid*, pay, paying*, pays, perform*, pick*, plough*, plow*, posses*, possess*, practic*, prepar*, pric*, privation*, produc*, profit*, profitabl*, property*, purchas*, pursu*, reach*, reconstruct, record*, recover*, repair*, reproduce, restor*, result*, risk*, sel*, sell*, skil*, skill*, skillful*, sold*, sow*, spend*, spent*, student*, studi*, studiou*, study*, succe*, sweep*, swept*, task*, test*, toil, toiled, toils*, trad*, tried, try, trying*, trys, use, used, uses, using, win, winning*, wins, won, work*
##   [ reached max_nkey ... 4 more keys ]
## - [EMOTIONS]:
##   - [POSITIVE AFFECT]:
##     - amus*, amusement*, blith*, carefre*, celebrat*, cheer*, cheerful*, cheery*, chuckl*, delight*, delightful*, elat*, enjoy*, enjoyabl*, enjoyment*, entertain*, entertainment*, enthusiasm*, enthusiastic*, excit*, exhilerat*, exult*, exultant*, fun, funny*, gaiety*, gay*, glad*, gladnes*, glee, gleeful*, gleely, gratifi*, gratify*, grin*, happines*, happy*, hilariou*, humor*, humorou*, humour*, humourou*, jocund*, jok*, jolly, jovial*, joy*, joyful*, joyou*, laugh*, laughter*, merriment*, merry*, mirth*, mirthful*, overjoy*, playful*, pleasantry*, pleasur*, pleasurabl*, rejoic*, relief*, reliev*, rollick*, satisf*, smil*, thril*, thrill*, vivaciou*, vivacity*
##   - [ANXIETY]:
##     - tremor, afraid*, aghast*, alarm*, anguish*, anxi*, avoid*, blush*, cares, coward*, cower*, crisi*, dangerou*, desperat*, distres*, dread*, dreadful*, fear*, fearful*, frantic*, fret*, fright*, horrifi*, horrify*, horror*, nervou*, nervousnes*, panic*, phobia*, phobic*, scare, scared, scares, scary, shriek*, shudder*, shy*, terrifi*, terrify*, terror*, timid*, trauma*, trembl*, tremulou*, troubl*, uneasines*, uneasy*, worri*, worry*
##   - [SADNESS]:
##     - aggrieved, alas, deject*, depres*, depress*, despair*, despondant*, despondent*, dirg*, disappoint*, disappointment*, disconsolat*, discourag*, dishearten*, dismal*, dissatisfi*, dissatisfy*, distraught*, doldrum*, downcast*, dreary*, elegy*, forlorn*, frown*, funereal*, grie*, groan*, hopeles*, humiliat*, lament*, lamentat*, lone*, lonelines*, melanc*, miserabl*, miseri*, misery*, moan*, mourn*, mournful*, orphan*, pain*, pitiful*, plaint*, regret*, regretful*, remors*, repent*, repentanc*, repentenc*, rue, sad, sadden*, sadly, sadnes*, sob, sobb*, sobs, somber*, sombr*, sorrow*, sorrowful*, sorry*, suffer*, tearful*, tragedy*, tragic*, unhappines*, unhappy*, wail*, weep*, wept*, whin*, woe, woes
##   [ reached max_nkey ... 4 more keys ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants