• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JuliaText/WordNet.jl: A Julia package for Princeton's WordNet®.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

JuliaText/WordNet.jl

开源软件地址:

https://github.com/JuliaText/WordNet.jl

开源编程语言:

Julia 100.0%

开源软件介绍:

WordNet

Build Status

A Julia package for using Princeton's WordNet®, heavily inspired by Doches' rwordnet.

Simple Demo

using WordNet
db = DB()

WordNet.DB

lemma = db['a', "glad"]

glad.a

ss = synsets(db, lemma)

4-element Array{WordNet.Synset,1}: (a) glad (showing or causing joy and pleasure; especially made happy; "glad you are here"; "glad that they succeeded"; "gave a glad shout"; "a glad smile"; "heard the glad news"; "a glad occasion") (s) happy, glad (eagerly disposed to act or to be of service; "glad to help") (s) glad (feeling happy appreciation; "glad of the fire's warmth") (s) glad, beaming (cheerful and bright; "a beaming smile"; "a glad May morning")

antonyms(db, ss[1])

1-element Array{WordNet.Synset,1}: (a) sad (experiencing or showing sorrow or unhappiness; "feeling sad because his dog had died"; "Better by far that you should forget and smile / Than that you should remember and be sad"- Christina Rossetti)

expanded_hypernyms(db, synsets(db, db['n', "DOG"])[1])

13-element Array{WordNet.Synset,1}: (n) canine, canid (any of various fissiped mammals with nonretractile claws and typically long muzzles) (n) carnivore (a terrestrial or aquatic flesh-eating mammal; "terrestrial carnivores have four or five clawed digits on each limb") (n) eutherian mammal, placental, placental mammal, eutherian (mammals having a placenta; all mammals except monotremes and marsupials) (n) mammalian, mammal (any warm-blooded vertebrate having the skin more or less covered with hair; young are born alive except for the small subclass of monotremes and nourished with milk) (n) vertebrate, craniate (animals having a bony or cartilaginous skeleton with a segmented spinal column and a large brain enclosed in a skull or cranium) (n) chordate (any animal of the phylum Chordata having a notochord or spinal column) (n) animal, creature, animate being, brute, beast, fauna (a living organism characterized by voluntary movement) (n) organism, being (a living thing that has (or can develop) the ability to act or function independently) (n) living thing, animate thing (a living (or once living) entity) (n) unit, whole (an assemblage of parts that is regarded as a single entity; "how big is that part compared to the whole?"; "the team is a unit") (n) physical object, object (a tangible and visible entity; an entity that can cast a shadow; "it was full of rackets, balls and other objects") (n) physical entity (an entity that has physical existence) (n) entity (that which is perceived or known or inferred to have its own distinct existence (living or nonliving))

sensekey(db, synsets(db, db['n', "cat"])[1], db['n', "cat"])

"cat%1:05:00::"

sensekeys(db, db['n', "cat"])

8-element Array{SubString{String},1}: "cat%1:05:00::" "cat%1:18:01::" "cat%1:18:00::" "cat%1:06:02::" "cat%1:06:00::" "cat%1:06:01::" "cat%1:05:02::" "cat%1:04:00::"

Design consideration

This package loads all of WordNet into memory. It's not terribly expensive, but it may not be suitable for all developers.

Wordnet Data

The constructor DB can optionally take a path to a WordNet directory, containing a dict folder. This should work for any release of WordNet. If you do not specify such a path, WordNet 3.0 will automatically be downloaded the first time you call DB(). It will only be downloaded once. See DataDeps.jl's readme for more information.

George A. Miller (1995). WordNet: A Lexical Database for English. Communications of the ACM Vol. 38, No. 11: 39-41.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap