import test from 'tape'
import nlp from '../_lib.js'
const here = '[three/adj-noun] '

let arr = [
  ['abject', 'abjection'],
  ['abstemious', 'abstemiousness'],
  ['abundant', 'abundance'],
  ['accomplished', 'accomplishment'],
  ['accurate', 'accuracy'],
  ['active', 'activity'],
  ['adamant', 'adamance'],
  ['adaptable', 'adaptability'],
  ['addictive', 'addiction'],
  ['admirable', 'admiration'],
  ['adventurous', 'adventurousness'],
  ['affectionate', 'affection'],
  ['aggressive', 'aggression'],
  ['agile', 'agility'],
  ['agitated', 'agitation'],
  ['alert', 'alertness'],
  ['aloof', 'aloofness'],
  ['amazed', 'amazement'],
  ['ambitious', 'ambition'],
  ['amiable', 'amiability'],
  ['amicable', 'amicability'],
  ['amorous', 'amorousness'],
  ['ample', 'ampleness'],
  ['amused', 'amusement'],
  ['ancient', 'antiquity'],
  ['apprehensive', 'apprehensiveness'],
  ['ardent', 'ardor'],
  ['argumentative', 'argumentativeness'],
  ['articulate', 'articulacy'],
  ['artistic', 'art'],
  ['assertive', 'assertiveness'],
  ['astute', 'astuteness'],
  ['attractive', 'attractiveness'],
  ['audacious', 'audacity'],
  ['austere', 'austerity'],
  ['authentic', 'authenticity'],
  ['automatic', 'automation'],
  ['bad', 'badness'],
  ['beautiful', 'beauty'],
  ['benevolent', 'benevolence'],
  ['bold', 'boldness'],
  ['boring', 'boredom'],
  ['brave', 'bravery'],
  ['bright', 'brightness'],
  ['busy', 'business'],
  ['calm', 'calmness'],
  ['cantankerous', 'cantankerousness'],
  ['careful', 'carefulness'],
  ['caring', 'care'],
  ['cautious', 'caution'],
  ['certain', 'certainty'],
  ['charismatic', 'charisma'],
  ['cheap', 'cheapness'],
  ['cheerful', 'cheerfulness'],
  ['circumspect', 'circumspection'],
  ['clean', 'cleanliness'],
  ['clear', 'clarity'],

  ['clever', 'cleverness'],
  ['cold', 'coldness'],
  ['comfortable', 'comfort'],
  ['compassionate', 'compassion'],
  ['compatible', 'compatibility'],
  ['competent', 'competency'],
  ['concise', 'conciseness'],
  ['condescending', 'condescension'],
  ['confident', 'confidence'],
  ['congenial', 'congeniality'],
  ['conscientious', 'conscientiousness'],
  ['contemptuous', 'contemptuousness'],
  ['cooperative', 'cooperation'],
  ['courageous', 'courage'],
  ['courteous', 'courtesy'],
  ['coy', 'coyness'],
  ['creative', 'creativity'],
  ['credible', 'credibility'],
  ['curious', 'curiosity'],
  ['dark', 'darkness'],
  ['decisive', 'decisiveness'],
  ['dedicated', 'dedication'],
  ['deep', 'depth'],
  ['deliberate', 'deliberation'],
  ['delicate', 'delicacy'],
  ['delightful', 'delight'],
  ['dependable', 'dependability'],
  ['desperate', 'desperation'],
  ['determined', 'determination'],
  ['devoted', 'devotion'],
  ['diffident', 'diffidence'],
  ['diligent', 'diligence'],
  ['dirty', 'dirtiness'],
  ['disciplined', 'discipline'],
  ['discreet', 'discretion'],
  ['doleful', 'dolefulness'],
  ['dramatic', 'drama'],
  ['dull', 'dullness'],
  ['dynamic', 'dynamism'],
  ['eager', 'eagerness'],
  ['educated', 'education'],
  ['efficient', 'efficiency'],
  ['elegant', 'elegance'],
  ['eloquent', 'eloquence'],
  ['empathetic', 'empathy'],
  ['empty', 'emptiness'],
  ['enduring', 'endurance'],
  ['energetic', 'energy'],
  ['engaging', 'engagement'],
  ['enough', 'enoughness'],
  ['enthusiastic', 'enthusiasm'],
  ['excellent', 'excellence'],
  ['exemplary', 'exemplariness'],
  ['expedient', 'expedience'],
  ['expensive', 'expense'],
  ['experienced', 'experience'],
  ['explosive', 'explosiveness'],
  ['expressive', 'expressiveness'],
  ['facetious', 'facetiousness'],
  ['fanciful', 'fancifulness'],
  ['fantastic', 'fantasy'],
  ['fast', 'fastness'],
  ['fatuous', 'fatuousness'],
  ['fearless', 'fearlessness'],
  ['fertile', 'fertility'],
  ['fervent', 'fervor'],
  ['fierce', 'fierceness'],
  ['flawless', 'flawlessness'],
  ['flexible', 'flexibility'],
  ['flowing', 'flow'],
  ['focused', 'focus'],
  ['forceful', 'force'],
  ['forgiving', 'forgiveness'],
  ['fortunate', 'fortune'],
  ['fragrant', 'fragrance'],
  ['frank', 'frankness'],
  ['free', 'freedom'],
  ['friendly', 'friendliness'],
  ['frivolous', 'frivolity'],
  ['frugal', 'frugality'],
  ['full', 'fullness'],
  ['funny', 'funniness'],
  ['furious', 'fury'],
  ['furry', 'furriness'],
  ['furtive', 'furtiveness'],
  ['gaudy', 'gaudiness'],
  ['gay', 'gayness'],
  ['generous', 'generosity'],
  ['gentle', 'gentleness'],
  ['ghastly', 'ghastliness'],
  ['glamorous', 'glamour'],
  ['glaring', 'glare'],
  ['glowing', 'glow'],
  ['good', 'goodness'],
  ['graceful', 'grace'],
  ['gracious', 'graciousness'],
  ['guileless', 'guilelessness'],
  ['gullible', 'gullibility'],
  ['hard', 'hardness'],
  ['hardworking', 'hardwork'],
  ['harried', 'harriedness'],
  ['harsh', 'harshness'],
  ['hazardous', 'hazard'],
  ['heavy', 'heaviness'],
  ['heroic', 'heroism'],
  ['hoary', 'hoariness'],
  ['honest', 'honesty'],
  ['hopeful', 'hopefulness'],
  ['hospitable', 'hospitality'],
  ['hot', 'heat'],
  ['huge', 'hugeness'],
  ['humble', 'humility'],
  ['humorous', 'humor'],
  ['iffy', 'iffiness'],
  ['imaginative', 'imagination'],
  ['impartial', 'impartiality'],
  ['imperfect', 'imperfection'],
  ['imperious', 'imperiousness'],
  ['imperturbable', 'imperturbability'],
  ['implacable', 'implacability'],
  ['impossible', 'impossibility'],
  ['impressive', 'impressiveness'],
  ['impulsive', 'impulsiveness'],
  ['inane', 'inanity'],
  ['independent', 'independence'],
  ['indolent', 'indolence'],
  ['industrious', 'industry'],
  ['ineluctable', 'ineluctability'],
  ['inept', 'ineptitude'],
  ['inimitable', 'inimitability'],
  ['innovative', 'innovation'],
  ['inquisitive', 'inquisitiveness'],
  ['insightful', 'insight'],
  ['inspiring', 'inspiration'],
  ['intelligent', 'intelligence'],
  ['intemperate', 'intemperance'],
  ['intrepid', 'intrepidity'],
  ['intuitive', 'intuition'],
  ['inventive', 'inventiveness'],
  ['ironic', 'irony'],
  ['jittery', 'jitteriness'],
  ['jovial', 'joviality'],
  // ['joyful', 'joy'],
  // ['joyous', 'joy'],
  ['keen', 'keenness'],
  ['kind', 'kindness'],
  ['knowledgeable', 'knowledge'],
  ['laconic', 'laconicism'],
  ['lavish', 'lavishness'],
  ['lazy', 'laziness'],
  ['legal', 'legality'],
  ['liberal', 'liberality'],
  ['light', 'lightness'],
  ['lively', 'liveliness'],
  ['lofty', 'loftiness'],
  ['long', 'length'],
  ['loquacious', 'loquaciousness'],
  ['lost', 'loss'],
  ['loud', 'loudness'],
  ['loving', 'love'],
  ['loyal', 'loyalty'],
  ['lucid', 'lucidity'],
  ['luminous', 'luminosity'],
  ['lush', 'lushness'],
  ['luxurious', 'luxury'],
  ['magical', 'magic'],
  ['magnanimous', 'magnanimity'],
  ['majestic', 'majesty'],
  ['mature', 'maturity'],
  ['maverick', 'maverickness'],
  ['mawkish', 'mawkishness'],
  ['melodic', 'melody'],
  ['meticulous', 'meticulousness'],
  ['mighty', 'mightiness'],
  ['modest', 'modesty'],
  ['moist', 'moistness'],
  ['momentous', 'momentousness'],
  ['motivated', 'motivation'],
  ['mundane', 'mundanity'],
  ['musical', 'music'],
  ['mysterious', 'mystery'],
  ['mystical', 'mysticism'],
  ['naive', 'naivety'],
  ['narcissistic', 'narcissism'],
  ['narrow', 'narrowness'],
  ['naughty', 'naughtiness'],
  ['nervous', 'nervousness'],
  ['noble', 'nobility'],
  ['nonchalant', 'nonchalance'],
  ['nurturing', 'nurturance'],
  ['obedient', 'obedience'],
  ['oblivious', 'obliviousness'],
  ['observant', 'observation'],
  ['offensive', 'offence'],
  ['offhand', 'offhandedness'],
  ['ominous', 'ominousness'],
  // ['open-minded', 'open-mindedness'],
  ['optimistic', 'optimism'],
  ['organized', 'organization'],
  ['orotund', 'orotundity'],
  ['ostentatious', 'ostentatiousness'],
  ['outgoing', 'outgoingness'],
  ['pacifist', 'pacifism'],
  ['passionate', 'passion'],
  ['patient', 'patience'],
  ['pedantic', 'pedantry'],
  ['peerless', 'peerlessness'],
  ['perceptive', 'perception'],
  ['perfect', 'perfection'],
  ['persistent', 'persistence'],
  ['personal', 'personality'],
  ['persuasive', 'persuasion'],
  ['physical', 'physicality'],
  ['placid', 'placidity'],
  ['playful', 'playfulness'],
  ['pleasant', 'pleasantness'],
  ['pliant', 'pliancy'],
  ['poignant', 'poignancy'],
  ['poised', 'poise'],
  ['polite', 'politeness'],
  ['poor', 'poverty'],
  ['popular', 'popularity'],
  ['positive', 'positivity'],
  ['possessive', 'possession'],
  ['powerful', 'power'],
  ['practical', 'practicality'],
  ['pragmatic', 'pragmatism'],
  ['present', 'presence'],
  ['proactive', 'proactivity'],
  ['prodigious', 'prodigiousness'],
  ['professional', 'professionalism'],
  ['proficient', 'proficiency'],
  ['proportionate', 'proportion'],
  ['protective', 'protection'],
  ['prudent', 'prudence'],
  ['punctual', 'punctuality'],
  ['purposeful', 'purpose'],
  ['querulous', 'querulousness'],
  // ['quick-witted', 'quick-wittedness'],
  ['quick', 'quickness'],
  // ['quiet', 'quiet'],
  ['quixotic', 'quixoticism'],
  ['radiant', 'radiance'],
  ['rampant', 'rampantness'],
  ['random', 'randomness'],
  ['rapacious', 'rapaciousness'],
  ['ravishing', 'ravishingness'],
  ['ready', 'readiness'],
  ['realistic', 'realism'],
  ['reasonable', 'reasonableness'],
  ['receptive', 'receptiveness'],
  ['recondite', 'reconditeness'],
  ['red', 'redness'],
  ['refined', 'refinement'],
  ['relentless', 'relentlessness'],
  ['reliable', 'reliability'],
  ['reprobate', 'reprobacy'],
  ['resilient', 'resilience'],
  // ['resolute', 'resolution'],
  ['resourceful', 'resourcefulness'],
  ['respectable', 'respect'],
  ['respectful', 'respect'],
  ['responsible', 'responsibility'],
  ['reverent', 'reverence'],
  ['rich', 'richness'],
  ['riotous', 'riotousness'],
  ['ripe', 'ripeness'],
  ['risible', 'risibility'],
  ['romantic', 'romance'],
  ['rough', 'roughness'],
  ['round', 'roundness'],
  ['sad', 'sadness'],
  ['salubrious', 'salubriousness'],
  ['scrupulous', 'scrupulousness'],
  ['scurrilous', 'scurrility'],
  ['seditious', 'seditiousness'],
  // ['self-assured', 'self-assurance'],
  // ['self-disciplined', 'self-discipline'],
  ['selfless', 'selflessness'],
  ['sensible', 'sensibility'],
  ['sensitive', 'sensitivity'],
  ['serene', 'serenity'],
  ['serious', 'seriousness'],
  ['sharp', 'sharpness'],
  ['shining', 'shininess'],
  ['short', 'shortness'],
  ['silent', 'silence'],
  ['simple', 'simplicity'],
  ['sincere', 'sincerity'],
  ['sinister', 'sinisterness'],
  ['skillful', 'skill'],
  ['slippery', 'slipperiness'],
  ['slow', 'slowness'],
  ['smooth', 'smoothness'],
  ['soft', 'softness'],
  ['solid', 'solidity'],
  ['soothing', 'soothingness'],
  ['sour', 'sourness'],
  ['specious', 'speciousness'],
  ['spiritual', 'spirituality'],
  ['spontaneous', 'spontaneity'],
  ['sporadic', 'sporadicness'],
  ['spurious', 'spuriousness'],
  ['stalwart', 'stalwartness'],
  ['stern', 'sternness'],
  ['straight', 'straightness'],
  ['strategic', 'strategy'],
  ['strict', 'strictness'],
  ['strong', 'strength'],
  ['stubborn', 'stubbornness'],
  ['sturdy', 'sturdiness'],
  ['sublime', 'sublimity'],
  ['subservient', 'subservience'],
  ['subtle', 'subtleties'],
  ['successful', 'success'],
  ['superficial', 'superficiality'],
  ['supportive', 'support'],
  ['suspicious', 'suspicion'],
  ['sweet', 'sweetness'],
  ['swift', 'swiftness'],
  ['sympathetic', 'sympathy'],
  ['tactful', 'tact'],
  ['talented', 'talent'],
  ['tall', 'tallness'],
  ['tame', 'tameness'],
  ['tart', 'tartness'],
  ['tawdry', 'tawdriness'],
  ['tenacious', 'tenacity'],
  ['tender', 'tenderness'],
  ['tense', 'tenseness'],
  ['tenuous', 'tenuousness'],
  ['thin', 'thinness'],
  ['thirsty', 'thirstiness'],
  ['thorny', 'thorniness'],
  ['thorough', 'thoroughness'],
  ['thoughtful', 'thoughtfulness'],
  ['tidy', 'tidiness'],
  ['timely', 'timeliness'],
  ['timid', 'timidity'],
  ['timorous', 'timorousness'],
  ['tiny', 'tininess'],
  ['tired', 'tiredness'],
  ['tireless', 'tirelessness'],
  ['tolerant', 'tolerance'],
  ['tough', 'toughness'],
  ['trenchant', 'trenchancy'],
  ['trusting', 'trust'],
  ['trustworthy', 'trustworthiness'],
  ['tumultuous', 'tumult'],
  ['ubiquitous', 'ubiquitousness'],
  ['unctuous', 'unctuousness'],
  ['understanding', 'understanding'],
  ['unflappable', 'unflappability'],
  ['unique', 'uniqueness'],
  ['unyielding', 'unyieldingness'],
  ['vagrant', 'vagrancy'],
  ['valuable', 'value'],
  ['vapid', 'vapidity'],
  ['venerable', 'venerability'],
  ['versatile', 'versatility'],
  ['vertical', 'verticality'],
  ['vibrant', 'vibrancy'],
  ['vigilant', 'vigilance'],
  ['vigorous', 'vigor'],
  ['vivacious', 'vivacity'],
  ['vixenish', 'vixenishness'],
  ['volatile', 'volatility'],
  ['volumous', 'voluminousness'],
  ['vulnerable', 'vulnerability'],
  ['wanton', 'wantonness'],
  ['warm', 'warmth'],
  ['weak', 'weakness'],
  ['whimsical', 'whimsicalness'],
  ['wide', 'wideness'],
  ['wily', 'wiliness'],
  ['wise', 'wisdom'],
  ['wistful', 'wistfulness'],
  ['witty', 'wit'],
  ['woebegone', 'woefulness'],
  ['yielding', 'yieldingness'],
  ['young', 'youth'],
  ['zany', 'zaniness'],
  ['zealous', 'zeal'],
]

test('toNoun:', function (t) {
  // let { toNoun } = nlp().methods.two.transform.adjective
  arr.forEach(a => {
    let [adj, noun] = a
    // t.ok(nlp(noun).has('#Noun'), here + noun)
    // t.ok(nlp(adj).has('#Adjective'), here + adj)
    let res = nlp(adj).tag('Adjective').adjectives().conjugate()[0] || {}
    // let res = toNoun(adj)
    t.equal(res.Noun, noun, here + ` [${adj}, ${noun}]`)
  })
  t.end()
})
