资源简介
包含jws所需的jar包 edu.mit.jwi和edu.sussex.nlp.jws.beta.11以及基于JWS写的词语相似度比较算法和JWS相关的帮助文档
代码片段和文件信息
import java.util.TreeMap;
import java.text.*;
import edu.sussex.nlp.jws.*;
// ‘TestExamples‘: how to use Java WordNet::Similarity
// David Hope 2008
public class TestExamples
{
public static void main(String[] args)
{
// 1. SET UP:
// Let‘s make it easy for the user. So rather than set pointers in ‘Environment Variables‘ etc. let‘s allow the user to define exactly where they have put WordNet(s)
String dir = “C:/Program Files/WordNet“;
// That is you may have version 3.0 sitting in the above directory e.g. C:/Program Files/WordNet/3.0/dict
// The corresponding IC files folder should be in this same directory e.g. C:/Program Files/WordNet/3.0/WordNet-InfoContent-3.0
// Option 1 (Perl default): specify the version of WordNet you want to use (assuming that you have a copy of it) and use the default IC file [ic-semcor.dat]
JWS ws = new JWS(dir “3.0“);
// Option 2 : specify the version of WordNet you want to use and the particular IC file that you wish to apply
//JWS ws = new JWS(dir “3.0“ “ic-bnc-resnik-add1.dat“);
// 2. EXAMPLES OF USE:
// 2.1 [JIANG & CONRATH MEASURE]
JiangAndConrath jcn = ws.getJiangAndConrath();
System.out.println(“Jiang & Conrath\n“);
// all senses
TreeMap scores1 = jcn.jcn(“apple“ “banana“ “n“); // all senses
//TreeMap scores1 = jcn.jcn(“apple“ 1 “banana“ “n“); // fixed;all
//TreeMap scores1 = jcn.jcn(“apple“ “banana“ 2 “n“); // all;fixed
for(String s : scores1.keySet())
System.out.println(s + “\t“ + scores1.get(s));
// specific senses
System.out.println(“\nspecific pair\t=\t“ + jcn.jcn(“apple“ 1 “banana“ 1 “n“) + “\n“);
// max.
System.out.println(“\nhighest score\t=\t“ + jcn.max(“apple“ “banana“ “n“) + “\n\n\n“);
// 2.2 [LIN MEASURE]
Lin lin = ws.getLin();
System.out.println(“Lin\n“);
// all senses
TreeMap scores2 = lin.lin(“apple“ “banana“ “n“); // all senses
//TreeMap scores2 = lin.lin(“apple“ 1 “banana“ “n“); // fixed;all
//TreeMap scores2 = lin.lin(“apple“ “banana“ 2 “n“); // all;fixed
for(String s : scores2.keySet())
System.out.println(s + “\t“ + scores2.get(s));
// specific senses
System.out.println(“\nspecific pair\t=\t“ + lin.lin(“apple“ 1 “banana“ 1 “n“) + “\n“);
// max.
System.out.println(“\nhighest score\t=\t“ + lin.max(“apple“ “banana“ “n“) + “\n\n\n“);
// ... and so on for any other measure
}
} // eof
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-23 14:57 JWS\
目录 0 2013-11-23 14:57 JWS\JWS Code beta\
文件 2199 2008-12-02 15:12 JWS\JWS Code beta\TestExamples.class
文件 2486 2008-12-02 15:11 JWS\JWS Code beta\TestExamples.java
文件 1694 2008-12-02 15:06 JWS\JWS Code beta\TestJWSRandom.class
文件 1165 2008-12-02 15:03 JWS\JWS Code beta\TestJWSRandom.java
文件 123517 2008-10-10 15:07 JWS\JWS Code beta\edu.mit.jwi_2.1.4.jar
文件 65301 2009-05-09 16:05 JWS\JWS Code beta\edu.sussex.nlp.jws.beta.11.jar
文件 19928 2008-03-08 16:08 JWS\JWS Code beta\jwi-license-noncommercial
目录 0 2013-11-23 14:57 JWS\JWS Documents beta\
文件 8856 2008-11-11 16:36 JWS\JWS Documents beta\AdaptedLesk.html
文件 6504 2008-10-11 12:02 JWS\JWS Documents beta\AdaptedLeskTanimoto.html
文件 6238 2008-10-11 12:06 JWS\JWS Documents beta\AdaptedLeskTanimotoNoHyponyms.html
文件 1726 2008-10-11 12:16 JWS\JWS Documents beta\DepthFinder.html
文件 5497 2008-11-22 15:03 JWS\JWS Documents beta\Hirst & St-Onge.html
文件 10849 2008-12-02 15:08 JWS\JWS Documents beta\How To Use JWS.html
文件 24321 2008-11-10 16:43 JWS\JWS Documents beta\How To Use JWS_html_4eec6023.gif
文件 16303 2008-11-10 12:38 JWS\JWS Documents beta\How To Use JWS_html_5a5f9331.gif
文件 16170 2008-11-10 12:30 JWS\JWS Documents beta\How To Use JWS_html_m7227d2e4.gif
文件 1666 2008-10-11 12:15 JWS\JWS Documents beta\ICFinder.html
文件 1667 2008-10-11 12:20 JWS\JWS Documents beta\JWS(Java WordNet Similarity).html
文件 5441 2008-10-28 13:20 JWS\JWS Documents beta\JWSRandom.html
文件 5411 2008-10-11 11:58 JWS\JWS Documents beta\JiangAndConrath.html
文件 5308 2008-11-22 15:02 JWS\JWS Documents beta\LeacockAndChodorow.html
文件 5428 2008-10-11 11:59 JWS\JWS Documents beta\Lin.html
文件 1735 2008-10-17 14:22 JWS\JWS Documents beta\Parts Of Speech (POS).html
文件 5343 2008-10-11 11:53 JWS\JWS Documents beta\Path.html
文件 8905 2008-11-22 14:59 JWS\JWS Documents beta\READ ME.html
文件 22739 2008-11-22 14:30 JWS\JWS Documents beta\ReadMe-Notes_html_2e50369b.gif
文件 8602 2008-11-22 14:30 JWS\JWS Documents beta\ReadMe-Notes_html_m750dc661.gif
文件 2594 2008-10-19 11:11 JWS\JWS Documents beta\RelatedSynsets.html
............此处省略4个文件信息
相关资源
- gson.jar包
- achartengine.jar包h
- javax.ejb.jar
- DBCP需要的jar包
- MD5 jar包+使用(含源代码)
- junit包,jar包,测试必备
- junit的jar包
- stringUtils的jar包
- com.google.common.collect jar包
- javaweb实现邮件发送所需jar包
- httppost和httpget需要的jar包
- spring集成redis所需jar包
- mqtt jar包
- 文件上传所需jar包
- jxl.jar包最新jar包亲测可用
- cglib2.2jar包
- dom4j 官方绿色完整jar包
- hessian-4.0.7jar包加源码
- okio-1.6.0的jar包
- GeoJson的生成与解析所需jar包
- json_simple-1.1.jar包
- java-websocket jar包
- log4j-1.2.15.jar
- db2数据库连接jar包 for jdbc
- JDBC连接SQLServer2000三个jar包
- Jmeter链接mysql数据库jar包
- jmeter jar包
- javamail的jar包:javamail-1.6
- Pinyin4j jar包
- jaxb解析jar包
评论
共有 条评论