用飞镖将单词单数化

时间:2019-01-07 19:59:09

标签: javascript dart flutter

我有一个应用程序,用户在其中输入单词,然后使用该单词作为参数来调用API。问题是单词必须是单数形式,而我发现没有使用Dart / Flutter将单词单数化/复数化的软件包。

我发现,最接近的想法是在javascript package所示的Dart代码中使用here,但是由于我正在学习Dart和Flutter,而且我没有Java脚本的经验, d避免这样做:)。

我可以单数化我的输入吗?

1 个答案:

答案 0 :(得分:1)

尝试使用Datamuse。您可以无限制且无API密钥地使用此服务,每天最多可处理100,000个请求。 https://www.datamuse.com/api/

我要求

https://api.datamuse.com/words?md=d&sp=oranges

收到"defHeadword": "orange",希望您可以利用此

[
{
    "word": "oranges",
    "score": 129483,
    "defs": [
        "n\tany of a range of colors between red and yellow",
        "n\tround yellow to orange fruit of any of several citrus trees",
        "n\ta river in South Africa that flows generally westward to the Atlantic Ocean",
        "n\tany citrus tree bearing oranges",
        "n\tany pigment producing the orange color",
        "adj\tsimilar to the color of a ripe orange"
    ],
    "defHeadword": "orange"
},
{
    "word": "orange",
    "score": 67247,
    "defs": [
        "n\tany of a range of colors between red and yellow",
        "n\tround yellow to orange fruit of any of several citrus trees",
        "n\ta river in South Africa that flows generally westward to the Atlantic Ocean",
        "n\tany citrus tree bearing oranges",
        "n\tany pigment producing the orange color",
        "adj\tsimilar to the color of a ripe orange"
    ]
},
{
    "word": "ranges",
    "score": 64841,
    "defs": [
        "n\ta place for shooting (firing or driving) projectiles of various kinds",
        "n\ta variety of different things or activities",
        "n\tthe limits within which something can be effective",
        "n\ta large tract of grassy open land on which livestock can graze",
        "n\ta series of hills or mountains",
        "n\tthe limits of the values a function can take",
        "n\tan area in which something acts or operates or has power or control",
        "n\tthe limit of capability",
        "n\ta kitchen appliance used for cooking food",
        "v\trange or extend over; occupy a certain area",
        "v\tchange or be different within limits",
        "v\thave a range; be capable of projecting over a certain distance, as of a gun",
        "v\tlet eat",
        "v\tlay out in a line",
        "v\tmove about aimlessly or without any destination, often in search of food or employment",
        "v\tassign a rank or rating to",
        "v\tfeed as in a meadow or pasture"
    ],
    "defHeadword": "range"
},
{
    "word": "orangey",
    "score": 64729
},
{
    "word": "granges",
    "score": 64709,
    "defs": [
        "n\tan outlying farm"
    ],
    "defHeadword": "grange"
},
{
    "word": "orantes",
    "score": 64691
},
{
    "word": "orangs",
    "score": 64680,
    "defs": [
        "n\tlarge long-armed ape of Borneo and Sumatra having arboreal habits"
    ],
    "defHeadword": "orang"
},
{
    "word": "oranger",
    "score": 64675
},
{
    "word": "range",
    "score": 3884,
    "defs": [
        "n\ta place for shooting (firing or driving) projectiles of various kinds",
        "n\ta variety of different things or activities",
        "n\tthe limits within which something can be effective",
        "n\ta large tract of grassy open land on which livestock can graze",
        "n\ta series of hills or mountains",
        "n\tthe limits of the values a function can take",
        "n\tan area in which something acts or operates or has power or control",
        "n\tthe limit of capability",
        "n\ta kitchen appliance used for cooking food",
        "v\trange or extend over; occupy a certain area",
        "v\tchange or be different within limits",
        "v\thave a range; be capable of projecting over a certain distance, as of a gun",
        "v\tlet eat",
        "v\tlay out in a line",
        "v\tmove about aimlessly or without any destination, often in search of food or employment",
        "v\tassign a rank or rating to",
        "v\tfeed as in a meadow or pasture"
    ]
},
{
    "word": "ranger",
    "score": 804,
    "defs": [
        "n\ta member of a military unit trained as shock troops for hit-and-run raids",
        "n\ta member of the Texas state highway patrol; formerly a mounted lawman who maintained order on the frontier",
        "n\tan official who is responsible for managing and protecting an area of forest"
    ]
},
{
    "word": "grange",
    "score": 679,
    "defs": [
        "n\tan outlying farm"
    ]
},
{
    "word": "orang",
    "score": 450,
    "defs": [
        "n\tlarge long-armed ape of Borneo and Sumatra having arboreal habits"
    ]
},
{
    "word": "changes",
    "score": 439,
    "defs": [
        "n\tthe action of changing something",
        "n\ta different or fresh set of clothes",
        "n\ta thing that is different",
        "n\tan event that occurs when something passes from one state or phase to another",
        "n\tthe result of alteration or modification",
        "n\tmoney received in return for its equivalent in a larger denomination or a different currency",
        "n\tthe balance of money received when the amount you tender is greater than the amount due",
        "n\tcoins of small denomination regarded collectively",
        "n\ta relational difference between states; especially between states before and after some event",
        "n\ta difference that is usually pleasant",
        "v\tundergo a change; become different in essence; losing one's or its original nature",
        "v\tmake or become different in some particular way, without permanently losing one's or its former characteristics or essence",
        "v\tcause to change; make different; cause a transformation",
        "v\texchange or replace with another, usually of the same kind or category",
        "v\tremove or replace the coverings of",
        "v\tchange clothes; put on different clothes",
        "v\tchange from one vehicle or transportation line to another",
        "v\tgive to, and receive from, one another",
        "v\tbecome deeper in tone",
        "v\tlay aside, abandon, or leave for another"
    ],
    "defHeadword": "change"
},
{
    "word": "ganges",
    "score": 246,
    "defs": [
        "n\tan Asian river; rises in the Himalayas and flows east into the Bay of Bengal; a sacred river of the Hindus"
    ]
},
{
    "word": "rangel",
    "score": 240
},
{
    "word": "granger",
    "score": 227,
    "defs": [
        "n\ta person who operates a farm"
    ]
},
{
    "word": "orangery",
    "score": 203
},
{
    "word": "oracles",
    "score": 194,
    "defs": [
        "n\ta shrine where an oracular god is consulted",
        "n\ta prophecy (usually obscure or allegorical) revealed by a priest or priestess; believed to be infallible",
        "n\tan authoritative person who divines the future"
    ],
    "defHeadword": "oracle"
},
{
    "word": "flanges",
    "score": 193,
    "defs": [
        "n\ta projection used for strength or for attaching to another object"
    ],
    "defHeadword": "flange"
},
{
    "word": "orage",
    "score": 190
},
{
    "word": "frances",
    "score": 172,
    "defs": [
        "n\ta republic in western Europe; the largest country wholly in Europe",
        "n\tFrench writer of sophisticated novels and short stories (1844-1924)"
    ],
    "defHeadword": "france"
},
{
    "word": "fringes",
    "score": 170,
    "defs": [
        "n\tedging consisting of hanging threads or tassels",
        "n\ta social group holding marginal or extreme views",
        "n\ta part of the city far removed from the center",
        "n\tthe outside boundary or surface of something",
        "v\tdecorate with or as if with a surrounding fringe",
        "v\tadorn with a fringe"
    ],
    "defHeadword": "fringe"
},
{
    "word": "rangers",
    "score": 161,
    "defs": [
        "n\ta member of a military unit trained as shock troops for hit-and-run raids",
        "n\ta member of the Texas state highway patrol; formerly a mounted lawman who maintained order on the frontier",
        "n\tan official who is responsible for managing and protecting an area of forest"
    ],
    "defHeadword": "ranger"
},
{
    "word": "rages",
    "score": 146,
    "defs": [
        "n\tviolent state of the elements",
        "n\ta state of extreme anger",
        "n\tsomething that is desired intensely",
        "n\ta feeling of intense anger",
        "n\tan interest followed with exaggerated zeal",
        "v\tbe violent; as of fires and storms",
        "v\tfeel intense anger",
        "v\tbehave violently, as if in state of a great anger"
    ],
    "defHeadword": "rage"
},
{
    "word": "ranged",
    "score": 127,
    "defs": [
        "n\ta place for shooting (firing or driving) projectiles of various kinds",
        "n\ta variety of different things or activities",
        "n\tthe limits within which something can be effective",
        "n\ta large tract of grassy open land on which livestock can graze",
        "n\ta series of hills or mountains",
        "n\tthe limits of the values a function can take",
        "n\tan area in which something acts or operates or has power or control",
        "n\tthe limit of capability",
        "n\ta kitchen appliance used for cooking food",
        "v\trange or extend over; occupy a certain area",
        "v\tchange or be different within limits",
        "v\thave a range; be capable of projecting over a certain distance, as of a gun",
        "v\tlet eat",
        "v\tlay out in a line",
        "v\tmove about aimlessly or without any destination, often in search of food or employment",
        "v\tassign a rank or rating to",
        "v\tfeed as in a meadow or pasture"
    ],
    "defHeadword": "range"
},
{
    "word": "prange",
    "score": 110
},
{
    "word": "cranes",
    "score": 101,
    "defs": [
        "n\tlarge long-necked wading bird of marshes and plains in many parts of the world",
        "n\tlifts and moves heavy objects; lifting tackle is suspended from a pivoted boom that rotates around a vertical axis",
        "n\tUnited States poet (1899-1932)",
        "n\tUnited States writer (1871-1900)",
        "v\tstretch (the neck) so as to see better"
    ],
    "defHeadword": "crane"
},
{
    "word": "orangeat",
    "score": 98
},
{
    "word": "frange",
    "score": 97
},
{
    "word": "cringes",
    "score": 77,
    "defs": [
        "v\tdraw back, as with fear or pain",
        "v\tshow submission or fear"
    ],
    "defHeadword": "cringe"
},
{
    "word": "arranges",
    "score": 76,
    "defs": [
        "v\tarrange thoughts, ideas, temporal events, etc.",
        "v\tmake arrangements for",
        "v\tput into a proper or systematic order",
        "v\tadapt for performance in a different way",
        "v\tarrange attractively",
        "v\tset (printed matter) into a specific format",
        "v\tplan, organize, and carry out (an event)"
    ],
    "defHeadword": "arrange"
},
{
    "word": "osages",
    "score": 75,
    "defs": [
        "n\tthe Dhegiha dialect spoken by the Osage people",
        "n\ta river in Missouri that is a tributary of the Missouri River",
        "n\ta member of the Siouan people formerly living in Missouri in the valleys of the Missouri and Osage rivers; oil was found on Osage lands early in the 20th century"
    ],
    "defHeadword": "osage"
},
{
    "word": "orontes",
    "score": 74
},
{
    "word": "deranges",
    "score": 72,
    "defs": [
        "v\tthrow into great confusion or disorder",
        "v\tderange mentally, throw out of mental balance; make insane"
    ],
    "defHeadword": "derange"
},
{
    "word": "orangy",
    "score": 68
},
{
    "word": "forages",
    "score": 64,
    "defs": [
        "n\tthe act of searching for food and provisions",
        "n\tanimal food for browsing or grazing",
        "v\twander and feed",
        "v\tcollect or look around for (food)"
    ],
    "defHeadword": "forage"
},
{
    "word": "trances",
    "score": 58,
    "defs": [
        "n\ta state of mind in which consciousness is fragile and voluntary action is poor or missing; a state resembling deep sleep",
        "n\ta psychological state induced by (or as if induced by) a magical incantation",
        "v\tattract; cause to be enamored"
    ],
    "defHeadword": "trance"
},
{
    "word": "brangus",
    "score": 47
},
{
    "word": "orates",
    "score": 46,
    "defs": [
        "v\ttalk pompously"
    ],
    "defHeadword": "orate"
},
{
    "word": "franger",
    "score": 45
},
{
    "word": "oranje",
    "score": 43
},
{
    "word": "lorange",
    "score": 38
},
{
    "word": "prangos",
    "score": 35
},
{
    "word": "wrangel",
    "score": 35
},
{
    "word": "prances",
    "score": 34,
    "defs": [
        "n\ta proud stiff pompous gait",
        "v\tride a horse such that it springs and bounds forward",
        "v\tcause (a horse) to bound spring forward",
        "v\tspring foward on the hind legs",
        "v\tto walk with a lofty proud gait, often in an attempt to impress others"
    ],
    "defHeadword": "prance"
},
{
    "word": "ranees",
    "score": 34,
    "defs": [
        "n\t(the feminine of raja) a Hindu princess or the wife of a raja"
    ],
    "defHeadword": "ranee"
},
{
    "word": "boranes",
    "score": 32
},
{
    "word": "pranger",
    "score": 31
},
{
    "word": "rantes",
    "score": 31,
    "defs": [
        "n\ta loud bombastic declamation expressed with strong emotion",
        "n\tpompous or pretentious talk or writing",
        "v\ttalk in a noisy, excited, or declamatory manner"
    ],
    "defHeadword": "rant"
},
{
    "word": "anges",
    "score": 29,
    "defs": [
        "n\ta civilian reserve component of the United States Air Force that provides prompt mobilization during war and assistance during national emergencies"
    ],
    "defHeadword": "ang"
},
{
    "word": "manges",
    "score": 29,
    "defs": [
        "n\ta persistent and contagious disease of the skin causing inflammation and itching and loss of hair; affects domestic animals (and sometimes people)"
    ],
    "defHeadword": "mange"
},
{
    "word": "branes",
    "score": 27,
    "defs": [
        "n\tfood prepared from the husks of cereal grains",
        "n\tbroken husks of the seeds of cereal grains that are separated from the flour by sifting"
    ],
    "defHeadword": "bran"
},
{
    "word": "oannes",
    "score": 26
},
{
    "word": "outranges",
    "score": 25,
    "defs": [
        "v\thave a greater range than (another gun)"
    ],
    "defHeadword": "outrange"
},
{
    "word": "borages",
    "score": 24,
    "defs": [
        "n\tleaves flavor sauces and punches; young leaves eaten in salads or cooked",
        "n\thairy blue-flowered European annual herb long used in herbal medicine and eaten raw as salad greens or cooked like spinach"
    ],
    "defHeadword": "borage"
},
{
    "word": "grangers",
    "score": 22,
    "defs": [
        "n\ta person who operates a farm"
    ],
    "defHeadword": "granger"
},
{
    "word": "wrangles",
    "score": 22,
    "defs": [
        "n\tan angry dispute",
        "n\tan instance of intense argument (as in bargaining)",
        "v\therd and care for",
        "v\tto quarrel noisily, angrily or disruptively"
    ],
    "defHeadword": "wrangle"
},
{
    "word": "pranged",
    "score": 21
},
{
    "word": "orans",
    "score": 20,
    "defs": [
        "n\ta port city in northwestern Algeria and the country's 2nd largest city"
    ],
    "defHeadword": "oran"
},
{
    "word": "arangoes",
    "score": 18
},
{
    "word": "brandes",
    "score": 17,
    "defs": [
        "n\ta recognizable kind",
        "n\tidentification mark on skin, made by burning",
        "n\ta piece of wood that has been burned or is burning",
        "n\ta cutting or thrusting weapon with a long blade",
        "n\ta symbol of disgrace or infamy",
        "n\ta name given to a product or service",
        "v\tburn with a branding iron to indicate ownership; of animals",
        "v\tmark or expose as infamous",
        "v\tto accuse or condemn or openly or formally or brand as disgraceful"
    ],
    "defHeadword": "brand"
},
{
    "word": "oraches",
    "score": 15,
    "defs": [
        "n\tany of various herbaceous plants of the genus Atriplex that thrive in deserts and salt marshes"
    ],
    "defHeadword": "orache"
},
{
    "word": "ranes",
    "score": 15,
    "defs": [
        "n\ta score in baseball made by a runner touching all four bases safely",
        "n\tthe act of running; traveling on foot at a fast pace",
        "n\ta regular trip",
        "n\ta short trip",
        "n\t(American football) a play in which a player runs with the ball",
        "n\tan unbroken chronological sequence",
        "n\ta row of unravelled stitches",
        "n\tthe production achieved during a continuous period of operation (of a machine or factory etc.)",
        "n\tunrestricted freedom to use",
        "n\tthe continuous period of time during which something (a machine or a factory) operates or continues in operation",
        "n\tan unbroken series of events",
        "n\tthe act of testing something",
        "n\tthe pouring forth of a fluid",
        "n\ta race run on foot",
        "n\ta race between candidates for elective office",
        "n\ta small stream",
        "v\tbe diffused",
        "v\tmove along, of liquids",
        "v\tflee; take to one's heels; cut and run",
        "v\tcause an animal to move fast",
        "v\tmove about freely and without restraint, or act as if running around in an uncontrolled way",
        "v\tdeal in illegally, such as arms or liquor",
        "v\tset animals loose to graze",
        "v\tmake without a miss",
        "v\tcarry out a process or program, as on a computer or a machine",
        "v\toccur persistently",
        "v\textend or continue for a certain period of time",
        "v\tstretch out over a distance, space, time, or scope; run or extend between two points or beyond a certain point",
        "v\tcause something to pass or lead somewhere",
        "v\tbe affected by; be subjected to",
        "v\thave a particular form",
        "v\tbecome undone",
        "v\tcause to perform",
        "v\tchange from one state to another",
        "v\tbe operating, running or functioning",
        "v\tcarry out",
        "v\tcover by running; run a certain distance",
        "v\tmove fast by using one's feet, with one foot off the ground at any given time",
        "v\ttravel rapidly, by any (unspecified) means",
        "v\trun with the ball; in such sports as football",
        "v\tkeep company",
        "v\tsail before the wind",
        "v\tdirect or control; projects, businesses, etc.",
        "v\tchange or be different within limits",
        "v\tcome unraveled or undone as if by snagging",
        "v\treduce or cause to be reduced from a solid to a liquid state, usually by heating",
        "v\tcompete in a race",
        "v\trun, stand, or compete for an office or a position",
        "v\tpursue for food or sport (as of wild animals)",
        "v\tguide or pass over something",
        "v\tcause to emit recorded sounds",
        "v\tinclude as the content; broadcast or publicize",
        "v\ttravel a route regularly",
        "v\tprogress by being changed",
        "v\tcontinue to exist",
        "v\thave a tendency or disposition to do or be something; be inclined",
        "v\tperform as expected when applied"
    ],
    "defHeadword": "run"
},
{
    "word": "prangs",
    "score": 13,
    "defs": [
        "n\ta crash involving a car or plane",
        "v\tcrash"
    ],
    "defHeadword": "prang"
},
{
    "word": "frangos",
    "score": 11
},
{
    "word": "grandes",
    "score": 11,
    "defs": [
        "n\ta piano with the strings on a harp-shaped frame; usually supported by 3 legs",
        "n\tthe cardinal number that is the product of 10 and 100",
        "adj\timpressive in scale",
        "adj\timpressive in size or scope",
        "adj\tof or befitting a lord"
    ],
    "defHeadword": "grand"
},
{
    "word": "loranger",
    "score": 11
},
{
    "word": "dorantes",
    "score": 7
},
{
    "word": "rances",
    "score": 7
},
{
    "word": "dorange",
    "score": 6
},
{
    "word": "grunges",
    "score": 3,
    "defs": [
        "n\tthe state of being covered with unclean things"
    ],
    "defHeadword": "grunge"
},
{
    "word": "orango",
    "score": 3
},
{
    "word": "orange g",
    "score": 2
},
{
    "word": "tranger",
    "score": 2
},
{
    "word": "orane",
    "score": 1
},
{
    "word": "ornes",
    "score": 1
}

]