- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我有一个应用程序,我的用户在其中输入一个单词,然后我使用该单词作为参数调用 API。问题是这个词需要是单数的,我发现没有用 Dart/Flutter 将词单数化/复数化的包。
我发现最接近的想法是使用 javascript package在我的 Dart 代码中显示了 here但由于我正在学习 Dart 和 Flutter,而且我没有 Javascript 的经验,所以我宁愿避免这样做 :)。
有什么方法可以将我的输入单数化?
最佳答案
试试 Datamuse。您可以不受限制地使用此服务,无需 API key ,每天最多可处理 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
}
]
关于javascript - 用 Dart 将单词单数化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54080981/
我有一个 html 格式的表单: 我需要得到 JavaScript在value input 字段执行,但只能通过表单的 submit .原因是页面是一个模板所以我不控制它(不能有
我管理的论坛是托管软件,因此我无法访问源代码,我只能向页面添加 JavaScript 来实现我需要完成的任务。 我正在尝试用超链接替换所有页面上某些文本关键字的第一个实例。我还根据国家/地区代码对这些
我正在使用 JS 打开新页面并将 HTML 代码写入其中,但是当我尝试使用 document.write() 在新页面中编写 JS 时功能不起作用。显然,一旦看到 ,主 JS 就会关闭。用于即将打开的
提问不是为了解决问题,提问是为了更好地理解系统 专家!我知道每当你将 javascript 代码输入 javascript 引擎时,它会立即由 javascript 引擎执行。由于没有看过Engi
我在一个文件夹中有两个 javascript 文件。我想将一个变量的 javascript 文件传递到另一个。我应该使用什么程序? 最佳答案 window.postMessage用于跨文档消息。使
我有一个练习,我需要输入两个输入并检查它们是否都等于一个。 如果是 console.log 正则 console.log false 我试过这样的事情: function isPositive(fir
我正在做一个Web应用程序,计划允许其他网站(客户端)在其页面上嵌入以下javascript: 我的网络应用程序位于 http://example.org 。 我不能假设客户端网站的页面有 JQue
目前我正在使用三个外部 JS 文件。 我喜欢将所有三个 JS 文件合而为一。 尽一切可能。我创建 aio.js 并在 aio.js 中 src="https://code.jquery.com/
我有例如像这样的数组: var myArray = []; var item1 = { start: '08:00', end: '09:30' } var item2 = {
所以我正在制作一个 Chrome 扩展,它使用我制作的一些 TamperMonkey 脚本。我想要一个“主”javascript 文件,您可以在其中包含并执行其他脚本。我很擅长使用以下行将其他 jav
我有 A、B html 和 A、B javascript 文件。 并且,如何将 A JavaScript 中使用的全局变量直接移动到 B JavaScript 中? 示例 JavaScript) va
我需要将以下整个代码放入名为 activate.js 的 JavaScript 中。你能告诉我怎么做吗? var int = new int({ seconds: 30, mark
我已经为我的 .net Web 应用程序创建了母版页 EXAMPLE1.Master。他们的 I 将值存储在 JavaScript 变量中。我想在另一个 JS 文件中检索该变量。 示例1.大师:-
是否有任何库可以用来转换这样的代码: function () { var a = 1; } 像这样的代码: function () { var a = 1; } 在我的浏览器中。因为我在 Gi
我收到语法缺失 ) 错误 $(document).ready(function changeText() { var p = document.getElementById('bidp
我正在制作进度条。它有一个标签。我想调整某个脚本完成的标签。在找到可能的解决方案的一些答案后,我想出了以下脚本。第一个启动并按预期工作。然而,第二个却没有。它出什么问题了?代码如下: HTML:
这里有一个很简单的问题,我简单的头脑无法回答:为什么我在外部库中加载时,下面的匿名和onload函数没有运行?我错过了一些非常非常基本的东西。 Library.js 只有一行:console.log(
我知道 javascript 是一种客户端语言,但如果实际代码中嵌入的 javascript 代码以某种方式与在控制台上运行的代码不同,我会尝试找到答案。让我用一个例子来解释它: 我想创建一个像 Mi
我如何将这个内联 javascript 更改为 Unobtrusive JavaScript? 谢谢! 感谢您的回答,但它不起作用。我的代码是: PHP js文件 document.getElem
我正在寻找将简单的 JavaScript 对象“转储”到动态生成的 JavaScript 源代码中的最优雅的方法。 目的:假设我们有 node.js 服务器生成 HTML。我们在服务器端有一个对象x。
我是一名优秀的程序员,十分优秀!