From 91e6092916e19c0a2b94093ce0c39033cd26fea3 Mon Sep 17 00:00:00 2001 From: Amirhossein Aleyasin Date: Wed, 24 Aug 2016 15:48:45 -0500 Subject: [PATCH] add limit to wikidata consumer, change query to consider subclass, add test for all classes --- .gitignore | 1 - build.xml | 15 +- build/classes/type/detect/TypeDetect.class | Bin 1280 -> 0 bytes .../type/detect/grok/BooleanConverter.class | Bin 827 -> 0 bytes .../type/detect/grok/ByteConverter.class | Bin 806 -> 0 bytes .../classes/type/detect/grok/Converter.class | Bin 3007 -> 0 bytes .../type/detect/grok/DateConverter.class | Bin 1362 -> 0 bytes .../type/detect/grok/Discovery$1.class | Bin 1403 -> 0 bytes .../classes/type/detect/grok/Discovery.class | Bin 5529 -> 0 bytes .../type/detect/grok/DoubleConverter.class | Bin 820 -> 0 bytes .../type/detect/grok/FloatConverter.class | Bin 813 -> 0 bytes build/classes/type/detect/grok/Garbage.class | Bin 3096 -> 0 bytes build/classes/type/detect/grok/Grok.class | Bin 9094 -> 0 bytes .../classes/type/detect/grok/GrokUtils.class | Bin 641 -> 0 bytes .../classes/type/detect/grok/IConverter.class | Bin 829 -> 0 bytes .../type/detect/grok/IntegerConverter.class | Bin 823 -> 0 bytes build/classes/type/detect/grok/KeyValue.class | Bin 1333 -> 0 bytes .../type/detect/grok/LongConverter.class | Bin 806 -> 0 bytes build/classes/type/detect/grok/Match$1.class | Bin 649 -> 0 bytes build/classes/type/detect/grok/Match.class | Bin 5726 -> 0 bytes build/classes/type/detect/grok/Pile.class | Bin 3473 -> 0 bytes .../type/detect/grok/ShortConverter.class | Bin 813 -> 0 bytes .../type/detect/grok/StringConverter.class | Bin 700 -> 0 bytes .../detect/grok/exception/GrokError.class | Bin 741 -> 0 bytes .../detect/grok/exception/GrokException.class | Bin 817 -> 0 bytes .../detect/kb/freebase/FreebaseUtil.class | Bin 5450 -> 0 bytes .../knowledgegraph/KnowledgeGraphUtil.class | Bin 3977 -> 0 bytes resources/wikidata/search_by_id.sparql | 7 +- .../detect/kb/wikidata/WikiDataConsumer.java | 12 +- test/type/detect/TypeDetectTest.java | 92 +++++++++++ test/type/detect/kb/KbSuite.java | 45 ++++++ .../detect/kb/freebase/FreebaseSuite.java | 38 +++++ .../detect/kb/freebase/FreebaseUtilTest.java | 79 +++++++++ .../KnowledgeGraphUtilTest.java | 75 +++++++++ .../knowledgegraph/KnowledgegraphSuite.java | 38 +++++ .../detect/kb/sparql/SparqlConsumerTest.java | 60 +++++++ test/type/detect/kb/sparql/SparqlSuite.java | 38 +++++ .../kb/wikidata/WikiDataConsumerTest.java | 128 +++++++++++++++ .../kb/wikidata/WikiDataSearchEntityTest.java | 150 ++++++++++++++++++ .../detect/kb/wikidata/WikidataSuite.java | 39 +++++ 40 files changed, 810 insertions(+), 7 deletions(-) delete mode 100644 build/classes/type/detect/TypeDetect.class delete mode 100644 build/classes/type/detect/grok/BooleanConverter.class delete mode 100644 build/classes/type/detect/grok/ByteConverter.class delete mode 100644 build/classes/type/detect/grok/Converter.class delete mode 100644 build/classes/type/detect/grok/DateConverter.class delete mode 100644 build/classes/type/detect/grok/Discovery$1.class delete mode 100644 build/classes/type/detect/grok/Discovery.class delete mode 100644 build/classes/type/detect/grok/DoubleConverter.class delete mode 100644 build/classes/type/detect/grok/FloatConverter.class delete mode 100644 build/classes/type/detect/grok/Garbage.class delete mode 100644 build/classes/type/detect/grok/Grok.class delete mode 100644 build/classes/type/detect/grok/GrokUtils.class delete mode 100644 build/classes/type/detect/grok/IConverter.class delete mode 100644 build/classes/type/detect/grok/IntegerConverter.class delete mode 100644 build/classes/type/detect/grok/KeyValue.class delete mode 100644 build/classes/type/detect/grok/LongConverter.class delete mode 100644 build/classes/type/detect/grok/Match$1.class delete mode 100644 build/classes/type/detect/grok/Match.class delete mode 100644 build/classes/type/detect/grok/Pile.class delete mode 100644 build/classes/type/detect/grok/ShortConverter.class delete mode 100644 build/classes/type/detect/grok/StringConverter.class delete mode 100644 build/classes/type/detect/grok/exception/GrokError.class delete mode 100644 build/classes/type/detect/grok/exception/GrokException.class delete mode 100644 build/classes/type/detect/kb/freebase/FreebaseUtil.class delete mode 100644 build/classes/type/detect/kb/knowledgegraph/KnowledgeGraphUtil.class create mode 100644 test/type/detect/TypeDetectTest.java create mode 100644 test/type/detect/kb/KbSuite.java create mode 100644 test/type/detect/kb/freebase/FreebaseSuite.java create mode 100644 test/type/detect/kb/freebase/FreebaseUtilTest.java create mode 100644 test/type/detect/kb/knowledgegraph/KnowledgeGraphUtilTest.java create mode 100644 test/type/detect/kb/knowledgegraph/KnowledgegraphSuite.java create mode 100644 test/type/detect/kb/sparql/SparqlConsumerTest.java create mode 100644 test/type/detect/kb/sparql/SparqlSuite.java create mode 100644 test/type/detect/kb/wikidata/WikiDataConsumerTest.java create mode 100644 test/type/detect/kb/wikidata/WikiDataSearchEntityTest.java create mode 100644 test/type/detect/kb/wikidata/WikidataSuite.java diff --git a/.gitignore b/.gitignore index c2106f6..21f6e68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /dist/ /build/ /store/ -build diff --git a/build.xml b/build.xml index 8146a81..d9e5b22 100644 --- a/build.xml +++ b/build.xml @@ -89,11 +89,22 @@ - + + + + + + + + - + + + + + diff --git a/build/classes/type/detect/TypeDetect.class b/build/classes/type/detect/TypeDetect.class deleted file mode 100644 index e2a74c47729b1bc476e00dfdef63b84403001bc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1280 zcmZ`&T~8B16g|^Vy3`gamSPow*3wdBO*BzcLZT(USoEO;V|?1SlRB{7HQTAmztSg& zCjJ0_l=05&N|$!ohnYKf?mg$+J9q#5{rMZfQ#>}1#zO-&Y^$Z7M#De?J83l2*kwrV z3rENUhIqYk!jNdY1J01|2#3F&jC$NVwt6;smOF0WvQI2esB_><$WLO-Q0mC@&)ghv z$@|hgCi_sEEy5dF!eJ=ZKXy*7FP3Rr&d}^iPdLMt=CiyZArvC685VkcEEP0Etsap- z?;=9Uzey!`j*g)kfJ~&Y&5jt$RwF7bVbc}El7BZ1rZTQKfs_S}sLsUh&*L6YH!@u@ zbSydXsG{eyVj^=Q1y;hTU4BCu@iC_=@*!m^l%aCn6G_YPY=$E;EK;4(bthh*zZPn2 z^3!S9Q!kRm0y1el%3=>IYFVYn*H5MU{L=HRbM-PR&ZLG%4;DSn^m*U)PHF5I>fzY4 zp7~XriGd|8^F0}dWVBspJQ;D1VR6XiE1E4Oj$tiaYTLDKf)lPo^NCHQ==V`y5;Tv< z&}z`>3GGaIcP_wwkP*Wotp@Etk^Zk$WXa032wz5?ml%FZ)Q#gaoLSDn(@x#Dd+#Ov8X{N0UiZHZ1s} zcGIFR`T_kY)N99bA`*#(=ghsj=lIN-`SL?htNY%TIda4xip>$F)gSE^0esF~ZA^e&~5 zzVVtmy77*qD3BsNiNdbbM(P8C?e_}8+e+gPSR-sdBYWDoW`C?YURTXfn2u)U55wL+XRfOwOdYa-Q;#~@m!DLe z%v3i1E;i}H#+Z$D7jLlPViQ{~rcffRKN}KZX=tWzhA`I;Av-!@rr%A2Be*T0+cGQX zM>noKWJam|W#5$2hk4fZPM}KX^aLzfbt(-b~8pX-s2=nX^1yV4RyiV$Bz+=6l9i c)7stpg~C(CK}S}qnCUQYK5e>0M5HPU&wc2eGv{8|3(0r-d=4-Qs5tYR%W);;9$#>IwTV0t?vfg56t{R83btR2X>OnJSzvzxYv1)JIDrhLHLK`$q z{57cDT6GdfJ!PyihXQWcF9fzq)oa<4K}$x>pk|GZnuoh%t%ONJz9(DV^xg@yfOmQm zs=blw}q$3da221H>JZ3_PAr+U(&4bH5K@e94OTP#`KH zmsw>Pr}iI_c|`UH^Kt(7l)u!+4ERK27O%*hBRa=8KYL8gg@NV=#zfQE+rLNdsp7aJ SXP`LLA#X8tu!PrXT>c9b$FP9_ diff --git a/build/classes/type/detect/grok/Converter.class b/build/classes/type/detect/grok/Converter.class deleted file mode 100644 index c589f168034ad7d753f0a4037a257d61c00d9019..0000000000000000000000000000000000000000 GIT binary patch literal 0 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)W diff --git a/build/classes/type/detect/grok/DateConverter.class b/build/classes/type/detect/grok/DateConverter.class deleted file mode 100644 index b0752239af5ecd1d325e8531c44b012c15ea85a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1362 zcma)5T~8B16g|_AUAnG_EuaD-DneTd3w|I8gv1~uO&WYCA@RjzTgE!L-EFp0g8xc= z0E5OvAN^6rJF}Y>S|C2`%(LLxY`${n9=VR^`VFTl zL*X~p3sI;eg{LzqA${a}9j!ZnX0W!8>%1jJ;I~aIGpt_1`ClqS!hauxO;<8xq63x7 zFcl?Bek`4;Xtq4A`q|M)s%`EPxwr-0)tlNO89~6cOMq9_bul$l6%F5&osc|m2K_B} z&E4qtZj*$qYS0Pmd`GCO8}4G4l$SPcVwho6`>I>)HD_YQ##21AX`o)%Sj8B_L=V{S zg`#?CV-#a*nP8Z{eh?TY2LQcJ7;?S4?%psJFp$%2i00Q*bJ-gdJwtj{Ir)%laH+c6 z6HQ+B+tT&x1TE#u<#VpZ==cWv93hf)%MII4>O^*^t(?@QDUKE`i z+L?+LPr<&>A%PKE4IMneZ93Z#09oYdk8TNLgi^`dNYaVu4C5=3-;i23LHaWVA``&is*NHkWqL}3h8VHRMV<#S&k89d biN`E1lulq>M`ZRB5ycFpCh!oC^#1rC9W^k> diff --git a/build/classes/type/detect/grok/Discovery$1.class b/build/classes/type/detect/grok/Discovery$1.class deleted file mode 100644 index e5557ce8559847050122e1cb9a2b7a21ebe8993d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1403 zcmaJ=TT|0e5dKaZ2!sH&a%m9(wMs8YDWa$a1S>d<1uu1Ykq6WEObLXflb$j# z7hil3W_)0L_D4DHNi!u{A(`Zy-Lt#j?zek>{r+(dU;%|*Xvk>j!;FR=+}B8)?Lk(< z9CGqEui}AJE~t2@;*p9)hHkNEHWG6T<3({&=h-S3ydttS*Ez_(FdG%;h`T3wvRg83 zQ>-vdCa*F~?Jy_>r^*=yi>A%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+a#Tf;}B_8Op9KmluCyDl7{EtshYKW9MuGV_PYAVK;3gX_n@X}41R$O<~9V~93Ln! zhItG`u>@NMA|*#E5c7i`zh?{!B>h1_Z5(BkRvYyCy-gV$?DzV$3=Z*o$FY#>i>eOI zV6j|UTy+>98PsL4q|vYWy}2mf74%fm^Txes+JmLS@5vyrbK<)C#!(z@tIC_B`L(P$ zd*mo<4mIb^@yYQKcE0HKem#RDN3pD8);;j-oOs5sQ_=EZiN7R+qcT{rL#{ql?=NW> z#nC~d>X^OwP_Wcr>Nhe72Fv_q88qK6X|AtYDYwe~<@Q#Ezk*weJ??k=jVaFh9M0~= zs-S!4#7TblZboAjKSkY!`fSQRz!4DREY9RjGQug$L7E?mhL|}cScZ$pv5gVGglTsv z^XD?g^m1&$6}S#pQr0z;b``7SYCOR4gSY{Y;YRGkO?Uw}<7HC3id%Wd-@!Zi?Ly!V z;lrI`7VZ*raF3|Pz2Y$3Cl1F>aSZMk&DbT@;z4mT9u{5LEqbs=4C7I;m4TME{t`cm zwX@DGgjvtsI2QfPI*oR%P$lK1o=QY;K6hWn-HOgj3vN+#KH70DZ9fh=t%xIv0oHmg zPA3BAGRF>M;l+_)P!DH8UqC#{Xw3>@l0Z3aY9ca8RLDHeR1hlyt~(RrSjuBUzb_|a`E*ECh$vN6~)x>-B6jEgD5=G>O&?9Ovu zLQYxoN$A=Hd#Xpnr5Zl03ZJ#l!5QE?Q%J*Q)$f3B6|y1hM~jBb)$SE{|> zuhMY!JD96M4koY&-a>h{4C-{rR}#CniENSGOB$Yq)@avvBa^&^|Ho#qS~kccNB7>x zFQQMQgr5>+L<{?fj0#@}QKOJ`DIeW%dF82aozi_h8?5Y1E=sch=JT8Ac^==pRC&lP diff --git a/build/classes/type/detect/grok/DoubleConverter.class b/build/classes/type/detect/grok/DoubleConverter.class deleted file mode 100644 index 2e2a625c732ab7fba1cd85ec92050a374d574ad0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 820 zcmah{OK;Oa7@W<+F0N_PmXt?w;>7l@8+g=P*aH6aV zZO}9ESNQ&U%(CXL14SlK9wUG^kviwI@ai@x4$#9%DJSJN3x$}@1Da8 zcyB(3YG8F74PDf4Rz2#T(j8TAb#yP1HZfFwIq&@4#B_7s(*gNjCr(VL-s&`#r3w0Z z>d}Xb1s6|zY~rbpEj;tFgo;4@ri296=O9xn0;|&qCKnf|PPch#0*eD_hU(u`yDsY% zzeX1A(MN$=qjgRAsPiXr`1=4wKD-r}9J_#3u$Fg!Kzw6UfXCCxmX}y$@8X+_ diff --git a/build/classes/type/detect/grok/FloatConverter.class b/build/classes/type/detect/grok/FloatConverter.class deleted file mode 100644 index 36926a34ee8ff8c4b08d01e09cfa52dad906dca8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 813 zcmah{%}(1u7@WUc&Ln3W?#S!M~%Q{y>%vsGKgf{4cgY|xVyhSHOi=DREIJeWPdKe z1-zq+Q1z@%;=YSDfvpEbk2`1dM%71c-HoLk7%J}-eSaEzZWJsXknXjUfeBSpr4}``3>=tn-V;(PBy&4WA6PCfb|JG z=7SnhDY?O}#5%KkgVGJkKe(UfUuXQ~5hmvojX69ebDro5>%!beYA)uQd#tIZv$OjP XmHUd*j+|U^tV7;X=3p7mvikfV@IJG) diff --git a/build/classes/type/detect/grok/Garbage.class b/build/classes/type/detect/grok/Garbage.class deleted file mode 100644 index 950615e69d42c9b7494fce2b56354d9a1ab6d0db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3096 zcma);{ZmwB6vw~MzTJhrg1icdp=t6iSxV+2MF@%_h9HLK%LT4*VcEsIcTtGS%1q0e zUZ?cOe(@K7aVB-PW}1Ggnfi+=%f8QZ@9tidW*mmQ&)YfQb3V^GclY;yfBYH1E__yu z1`KOBR*V3Ki|`CaG>jG_>`snHF&4uKyitq|7?)>H#&8O6%C&L%I4!3fox+(I&f;7Q z1}5ZVQp1!yV8&31^BSh*WJbENlz%H}4rS&iOncO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HB!RZ@}XY*ST3blAr{t%jr9`5Mk&K~386#E5tRy~zg^rpm-*r}<0?Q~HQ_~S&4-Of zr$dBwnAul2qof7xc2Scr(VNTA$q0Oz{6+cZ?yVw!$5&45ynb0Og)Z(6%pk7d79$u!xV62DZgWsMgAOTdA4S$8_0)7e`UB~5UVsI zR`a)JB(_v-keMiz8iZt)QGr_wDhr}j;uYgKr4;T}yhf73Pwa2PPc{15A*^LF zTGz@HxL(l4JZ4f|m=lxg<~94n8cM5N^RI4HCs=a^8%l8F@!{{7isj}wQ?X1TFsHj$A?og^jA* zP@e=}h3_3)ZQ*Y${4M4BZa$4N@A#+-u+=hs#7I+RIu~iBr?ib zH)bS8rTKd3!)(grwc?6?y@s+jNTy5j`&Lc%{cNevK>N*EtE zh553}ys+*T7EBFp=IhPgNjlAA@v!P!IE=GaJxjc9wPpA3bF z@1A4`wVy^;b8z-CW<#qwW7-m8pk=5)Gb4FO6~3C&%BtOE(RoFW<_yI3cv%;eJ7gwrVxO?Oaa-TfI zi?}cGI_`PiW4*+Ct5@YAm?y{a51jca$LA>ZPndNyo9Oq0d%^*_xaN?ID8CSf&&43pFL8Crlu^;gTQ@SN zDJx30HK=FPet}n54Ti9{lO51L{kkHE=_xUif!vz#7!~$7rpS{;(LOt`D$HiPqN-AX z`PDXs(|?|@kMobz8uR5uHQviT?q^rN85A}?d0y9%Q{}aSjFq#NFk0!@W2u}d;;N#+ zRRxJZ537fSi`3w=GmW{|0rDeYXASRso diff --git a/build/classes/type/detect/grok/GrokUtils.class b/build/classes/type/detect/grok/GrokUtils.class deleted file mode 100644 index 21dfa8ccb9d9fb49d1cb25a0dfd50bda468d6046..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 641 zcmah{%TC)+5Ir}9I0-JK;ZdNpDhs5z5xFebkfe!FRajsFf|LygexhKMJr1)b7s!G?)d4?!y|xIe8?k%$tK^FzPY!v zb+WtOYJJ<=X82?}L6^Hh;Cg~PK}YaNxZ)z@yS7py@@ov4y7Z-LFpQLp1BUchVlhmZ z(ihwPZd*hxyX}#uXafdNwa;xGIpi6_CF{D>towFXG)RZflQs_5m#+*t-b)uOEG;qmqDQTfKIl#Tc^n%1p`c^&Vu zphH8JVgB`97z**A+_Qa`@3c>8TZWJSeqsiV2w}4DYRP=b-&c|J-J0>g6Je1KoT0-r z%*7Lul_HzoisTp}PMVP({d@=ZD+%i)Gl_EyZ^+i42^hx&p)3l+3q zWVcwgMO@fq=FOWolS$q`Uf%%hVIzYSRy?eFSR)J-Rj5pfkjmvR3GPvJB?%K{70R=A zvnF*_)EbOTm!m*5E`?Us?}DzmQTK$kvUzMt|4JGe7{9KgJOA`33OiC8sSAYppSjHK z=5PI#SgckHCC>JOM2fJVE8mKa@Eanm`xT>ASTFP=`ESs9?Uq|&k#t8i+VL^^6bQpA zypD8J7((XwA&@PjqVV3sI$@-u>Y*@g&AIvimFKnz+XJ`*8(SDej3si#>OuceO8pRb zU5VN{kSEIC)cDuvckNlTaFHgg{BcEu$=+0wkr8Hk(AP}dO*s5`>}OXN2EQP-4tXcu z(>pJq=Q!-~IuwIV46~h02pBthJd$yIRb{ s1SVsB2UBc0-}D`3S^a7LUFOVS)+%GpwH4>t`W;zdEa5C-DdsMJ0(extp#T5? diff --git a/build/classes/type/detect/grok/IntegerConverter.class b/build/classes/type/detect/grok/IntegerConverter.class deleted file mode 100644 index d7bf616237d645f1c580cc1d113880395dfe9ad8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 823 zcmah{%TC)s6g@W&J9S;cqlC85@(7OrQjHKhA|!-bDN+QBRO}~a>P`rDG?_&36J7L6 z+D(hP-~;+m71xesB8bGob00eA_{_2Y{r`Ih-~gKrEWCB_4vX=zO-Q~?}GxA0ETxb=~>9SzHsXn3FG&eozT}UH+ z;{`gp^cta&fz&5aIF#B*eMqqV(LmU$H9KM`ysiiXuVu6fgTw8yRZ3<~aVWZjV&z65VETiW*)X_aD-A%=)UBUFh41k z27itu+Ow~OO06*|eXQ_*V(}jY! diff --git a/build/classes/type/detect/grok/KeyValue.class b/build/classes/type/detect/grok/KeyValue.class deleted file mode 100644 index fff4cc5ec47898d8161e3f9bdc423a82a6a1ae5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1333 zcma))OK%cU6vzK}W_T0^TKn=*tq5vie9Xp;(KMzQswr&~F)X^!40NPZ5Sn2i;S=~# z+_=z0W8%W43qO?coI5u#P-@)V*E#2Ze)oUx?>|3&0(gW{3UTBY5JQ27+dSM!;BEq2 z0(#pW2`pDnouOlQoNmjm1-{p9JrRfvozB3W4jwj6-DW_+bj$CxD~{J0_>>ZV>UF(f zTVShrUMX^-%1d??}UeoE+9pB@X{*K3 zc|kIS@`#KUeYIGd1ILY%lqoMDFs(JVI!O{LV@f1qW~$a3_)WLsv4PoguRC=8!1W*U ztC}!TG?75k!~#+#(ntziz0gR3rO9Uqd(by2mg>mS$BEOI(xI^&tu$7YGl|ligrII2 z8nd(uD6Z4IX?=&V#5ZU>=sXzKJ>K4@?H5_U$a$m+RA69-bjzgi94pwx6}-R=yu=bk zbD<(GVVQPe4R_@gvuKiFMG<_Uy+N_UKMAY{1T?|O%d70oU{ncXpD+%P$Du^ALg_I| zL7KuS1%<*ZHby6$Rjetf9hx~SV||733kl;R4E+-w=wKJ(GWbfiFvCREVx6KfXz6EM zf0=kfn{Ap|FUESGX`w}Q>Jgoo(xKO%Tdd6%AI&Ykh7Hwun_6j%EMIftAU^}}hG5@H wh4nCN>{MJiC2*Y_J%0;*7Njv3WD_^%fkb{(2=b0VS{H!upJDrQ(zjcG0lw_my8r+H diff --git a/build/classes/type/detect/grok/LongConverter.class b/build/classes/type/detect/grok/LongConverter.class deleted file mode 100644 index 68abdfea8ebcf063881c40c2bb369eb35eeac1db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 806 zcmah{&2G~`7@W>+J(EVe{kU1N?{#0G9@|en6?K$V ziH%Z|e~98dOONwxsEk$SP{2<{8-blhd@hGF>dGvQTGr?+J=~jVIVARFvU|I!E)VUr!=8uO>R8I%wqslc-nP4Ph*t3 zhu!xJfJ#7Y;5_xskGmLccNMjP+z=87uTzCA&ggTYf>$TVy%UXGG`e?H_zc X<*MUsB5&+C@u6X4!B|fm$ diff --git a/build/classes/type/detect/grok/Match$1.class b/build/classes/type/detect/grok/Match$1.class deleted file mode 100644 index 5830bdad629a3d4e04c1de013951ef217d498ebb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 649 zcmZ`$%TB^T6g>llVy*87iY{4*3oB~eXxyMCCZG!miOZp#z-VnvTTJ{b-DskTAK*tB zPb-PUz+&b;=A3)Z&3t{oe*!qbriCKPCe|$EP_|IOx`~R34T0jZ4s>!Nkl(6x1dK-L zDS^4B4%Fq~zN@0P?E361HbYnX9U1Ag9yX1nuVVrGA_!E}@MRn;mX&7m^q?G1CCW{l zUKHLrEt$CeYW;}VR8FUp`~k;SwrUg5#4hvkRz6C{mqE|D>fUl5+f&!N7szA~kzXGH zwEK~gUgq<7($Ev~t?O_Qx$0b}ds&&aom7Tvp9QWT#yaS=RMHPU8zxEutK;{vF^749 zwehdjy1>ex`w?^4YARvSUi3--3U=-4b(IlWrLBtjxlgDIWGBcgLP^q>^g{T5I=BtCreYyQ@X*`QLl9BpLK8eBZtI-R1w!znyz0 z55IZO{QwrLY8}h4EsSf*P=W2zTr16W8m`w7!Z!K1LBowY%G{5eWM+pnH%s#^9pA<+ z8gA7w6SqZhJMPf26T4(|X9T-(R|I>Im1eJoyCbN@sHnV0#~ALF&---TkMHQ%hX-Y(tk-4AB>d(ZkpG)%#4ZqaUDymxXD`|eM;Ws+kWv0Tl{kIx^r(kp? zlUAl9VGa*l!wQj==XCb>uUWUeZ$+=d^zLYCs5zEO#S&I?Y&ex{Ue2aXA>giS!z1fA zT2Wh}s(Yik*=$aj$yjrrorx!7+@(d$v^|os6sEe%BX&H|++(J>R@N7fB~5qr#PO?3 zCd(?CS>b4GYZv)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K5MG!?Cf5n X@=$Tok&`QqbjVxG94uiutIzKNA$qhv diff --git a/build/classes/type/detect/grok/StringConverter.class b/build/classes/type/detect/grok/StringConverter.class deleted file mode 100644 index 2943ebe1c90098f6bd912f2d3055037b5512273b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 700 zcmah`O;5r=5Pe%pk&1wz_<;xF!SIn-O^g=^i6NSp5ItbHm$Jdd+LE#m{ZmFgXyU;i z;EyuS0s&$VTxND=-+S|R_UHHO8^9S3Oz7A#5y5T@dok=Y7&YMuS!ak8OKk?d;dePh zswq5vGkWas;Lh&2)X6k`$9CIxAXGhT>hfL;84jEBdBCkMm)wz7FYq6%mJEc~Yxv%n z2a*R>hL|%g7>)-)#A#z~NUyttB}}A1jXuL}4V5zy?EM)lwMpA;@An zLw51%`CCz-&(rBMK^bZqXti{*C^OY5e}cWyLBkqFbq%~APBAeBz{EOLOt~bKBA-*G zQPwK2DlReKC(PXRcE(hQBvQml6I!RdnZ6*k4E2@T31y{blq(<5{wpqfF=mQ$9pYst K4z{p8$+fgc5Qg8W^8q3KAV6uMw3Jo|IN%GnA|&HD#j0yZjuRm+*2Y;Cm(-4&4T7J= z35f$gfFFgJwGiDS2aoredFP$6*1vxL_zB<@jykaLxQ)X$o)FrnadehOX9V&I>uy;r zl_=Ci%vaK4JqY`?#Eau7P6vMArD2q$j_Z1(k^eUEw2BCOhHB^}i5G{pa1f2dzSgV} z4h+pW^xh9WH}U#u>^c2(dpF!(0dI|kok?i#$#ykYPr^OnK4nR^D`;Yp--=eW%i t?V5q+i|?Rs^$Pbnwm1zu#16-9eQvVR115{JdeJ>R;y19*k5(T5e*mv;m+}Ar diff --git a/build/classes/type/detect/grok/exception/GrokException.class b/build/classes/type/detect/grok/exception/GrokException.class deleted file mode 100644 index ff7f9f7b09d19d5511efe717e83bd8087b05dd85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcma)(NlzO=5QSfR8)BIy7>HRCwu>>#9DrOLnF9%k$l?O{-V7}>!OWnUHp|b-$r1;C z06z-xYV5E$j+7bcbys!uSFgJtpY9(3Y+)&n9Ogtmi+mB8cd+1KQDH1Lk*`|~6UBZQ zoE&^tP(Kxhcf%mIIl zF*9BdJz_QCjC;w9J@;dUO5NUF8TZUs<5{;Eg%_^5^~{x}19zX{k3UhB#pU`heXZS= z4w~+fjr^cleUmvpkHQ;iQ58GRrHNzRO#1(|OCjs&cFe`efdJ+Q^b&08ZT@}7{88AB zJhSH~hkj>%LmU)Pz_3VBq$Dz}Q2yTwP$<5hPM{6#d?BR z=$7>m+<*y8CRhhk_{4^SE%mT9#$q8?S?wU*Pu=F}z9!VEZq*Al*P{w+dJrqq&#IBN Q^ADEzlKYvVlN4s30sk_WssI20 diff --git a/build/classes/type/detect/kb/freebase/FreebaseUtil.class b/build/classes/type/detect/kb/freebase/FreebaseUtil.class deleted file mode 100644 index b085b21272ae539a43bc638d8b36a534ca207615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5450 zcma)A349c175`7N*_lj+1ePN#0&TgPqhzEUwi`<2NN8wCLY6~{nogEUvalDkvs~Iz zPiWOz3s{k=RVh@hm_l6wXho}5tJbsL_ia7ueblz}|IN-`x%10!XXcyt-uK@7|KI!G z?vpQGcnrW22`X;DK?R2t+^M1*ca`I9c)N;s;O=rhzEj3MGTx=&UKI)st7ya#8Anx2 zz(E!7#(gs0qu`i|i8!pl6xa7E=v8qX_p5jx-ml;e1s@Q452*McKBVHqI3eRf6|-Uhmj7G{1NA!-|I<>sZ!?CcvLPBXx?Pdv{)$#4rt!fR&%(hgt+q56o4zO!5Ju}rhuNSb=Hd$WoAax+iV2*>D5 z&9q1PwsZf^6m6o|HWhU)rBV@;|eG>Gsv^$FwXreS_MI>B3n%-J7W?JFUCQIbJJi05= z#ZAR-vb(*6n$h%y*Y3VFpovI2O@+!U6|u>R5_7MFGB=XSTvS~>VZqO`NH`j%DXE1J1#Kg=bG?ypXv#8^@g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hOXFn$ zSqdnAIgObCBu%nMZb zEBb{)v!#A|-Ge9+OdW6=e>IrJQQ@$2J%W?YwG<-3J@E6h0aZkxn!gCl!nORRU@;b9 zDe+szBwvqP5I~4u|9iL+C5{OqY7x^tMDq2-@^+$lh$!Ami$@60aRPLLnx_cRL(J~O z%&P$KZd6jQ44nuv$JMw88?lMF%)(vRj4kxJ1_$seY^BUPyoUSUNS1_XeH&g4nftHg z>TCJC${}2VF5F5h$BB-CZvHBBf|f$WuY!Aeu$_Ad#81Pd74dhP`hthzt`~j8KFs?S zD7(yn%4O`}za(R)jEIb=^Bj{A2iFo_@AH@{W7lQ)Q0j_0FX(}VByEwy(u>@;f;KM< z&z1GpkSlG13goy$1&`lTKY;lze-`BU}^(D1t2HPlhZi&H2?dbn5%ne&O6A@lA)H!TW zXrtO;Lpk@Vbl9MBC&32WiR=PWE*majH*HGvHQQLk%08|LRxCluWxAbV#r`ZQ$Pn^E zkb+bIE|a(=4jJ|fF1(JlAo|^HrvPds-)zIO_Uqab8@NG#!Cd9jJCMr?#0xF#--}oHmGBLi1 nHTdRS@19F-@mFyXjil%DvyesOl^o)THV<6M&$sYeg15c|kJ8y1 diff --git a/build/classes/type/detect/kb/knowledgegraph/KnowledgeGraphUtil.class b/build/classes/type/detect/kb/knowledgegraph/KnowledgeGraphUtil.class deleted file mode 100644 index 3760975b9d2611bed365d045820f5b802b1a53ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3977 zcmb7H`(G5-75@$_JHs%DuCJ`csF4Uh*b!qA1J-IS5@dx9pb0T89hRGAV0UMonN{ff zWut9V`)-=PpY~m2+C@W?(s!G_{(}A;?WdnllYZ~)0J}iZ{IIk4-Z|&obH4X`&bjmI zYcIV5;4uE7<6$`UDBywySH~83I(!u6=%O55(s2mW4Vb~Zi;ckO(p zOF`pFC-3=I-alt$i$Z~3aGip1eOq`6wv;uBzMVBwi|f>i9<}qfe@sDb+um~uA}5`3 z>NX|qyy!3H#)La;jb*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JEC3b%}+7oLHM{Tqh z+gm~)b0E%x+%G{b;Xr4!JsvHgy@bR(%uY3~#txRyF^@x?T3ov!cRWlmB@Ldz6+%@T zfO-lWxYC6ta&0R?X(nM>_{JoBM@S_}rX;EK6v;GBN=%UyGrXc*CMm8E)~f{QSwblZ z_%w9dxPbGNR%j`Ux8ofIriGfLcqex>36aGEig2X`X+G;{aXSQcqqN(^BbXq?E>l(> zg+}`k*gQ_@_qFh#juEXTDP G -SELECT ?typelabel +SELECT distinct ?typelabel WHERE { - entity:{{id}} wdt:P31 ?type . + entity:{{id}} wdt:P31|wdt:P279 ?type . ?type rdfs:label ?typelabel FILTER (LANG(?typelabel)="en") . -} \ No newline at end of file + } + diff --git a/src/type/detect/kb/wikidata/WikiDataConsumer.java b/src/type/detect/kb/wikidata/WikiDataConsumer.java index e15a7a1..3e986c9 100644 --- a/src/type/detect/kb/wikidata/WikiDataConsumer.java +++ b/src/type/detect/kb/wikidata/WikiDataConsumer.java @@ -29,6 +29,7 @@ public class WikiDataConsumer { private static final String SEARCH_URL_TEMPLATE = "https://www.wikidata.org/w/api.php?action=wbsearchentities&search={{query}}&language=en&type=item&format=json"; private static final String SPAPRQL_TYPE_QUERY = IOUtils.readFileToString("resources/wikidata/search_by_id.sparql"); private static final String SPARQL_URL_TEMPLATE = "https://query.wikidata.org/sparql?format=json&query={{sparql}}"; + private static final Integer DEFUALT_SEARCH_LIMIT = 3; public static void main(String[] args) { // final Map types = getTypes("barack obama"); @@ -52,7 +53,7 @@ public static Map getTypes(List terms) { public static Map getTypes(String term) { Map freq = new HashMap<>(); - List results = search(term); + List results = search(term, DEFUALT_SEARCH_LIMIT); System.out.println(results); for (WikiDataSearchEntity ent : results) { final List types = recognizeTypesForID(ent.getId()); @@ -99,6 +100,15 @@ public static List recognizeTypesForID(String id) { return null; } + public static List search(String query, int limit) { + final List results = search(query); + if (results.size() <= limit) { + return results; + } else { + return results.subList(0, limit); + } + } + public static List search(String query) { List results = new ArrayList<>(); try { diff --git a/test/type/detect/TypeDetectTest.java b/test/type/detect/TypeDetectTest.java new file mode 100644 index 0000000..7f117b0 --- /dev/null +++ b/test/type/detect/TypeDetectTest.java @@ -0,0 +1,92 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect; + +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import junit.framework.TestCase; + +/** + * + * @author Amir + */ +public class TypeDetectTest extends TestCase { + + public TypeDetectTest(String testName) { + super(testName); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of main method, of class TypeDetect. + */ + public void testMain() { + System.out.println("main"); + String[] args = null; + TypeDetect.main(args); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of besttype method, of class TypeDetect. + */ + public void testBesttype_String() { + System.out.println("besttype"); + String text = ""; + TypeDetect instance = new TypeDetect(); + String expResult = ""; + String result = instance.besttype(text); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of besttype method, of class TypeDetect. + */ + public void testBesttype_List() { + System.out.println("besttype"); + List list = Arrays.asList("ITGB3", "ERBB2", "CTLA4"); + TypeDetect instance = new TypeDetect(); + String result = instance.besttype(list); + assertEquals("protein-coding gene", result); + } + + public void testBesttype_List2() { + System.out.println("besttype"); + List list = Arrays.asList("Klebsiella", "Escherichia coli", "Bacteria and protozoa", "Neisseria meningitidis"); + TypeDetect instance = new TypeDetect(); + String result = instance.besttype(list); + assertEquals("taxon", result); +// System.out.println(result); + } + + /** + * Test of besttype method, of class TypeDetect. + */ + public void testBesttype_Set() { + System.out.println("besttype"); + Set set = null; + TypeDetect instance = new TypeDetect(); + String expResult = ""; + String result = instance.besttype(set); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/KbSuite.java b/test/type/detect/kb/KbSuite.java new file mode 100644 index 0000000..35a253c --- /dev/null +++ b/test/type/detect/kb/KbSuite.java @@ -0,0 +1,45 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import type.detect.kb.freebase.FreebaseSuite; +import type.detect.kb.knowledgegraph.KnowledgegraphSuite; +import type.detect.kb.sparql.SparqlSuite; +import type.detect.kb.wikidata.WikidataSuite; + +/** + * + * @author Amir + */ +public class KbSuite extends TestCase { + + public KbSuite(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite("KbSuite"); + suite.addTest(WikidataSuite.suite()); + suite.addTest(KnowledgegraphSuite.suite()); + suite.addTest(SparqlSuite.suite()); + suite.addTest(FreebaseSuite.suite()); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/test/type/detect/kb/freebase/FreebaseSuite.java b/test/type/detect/kb/freebase/FreebaseSuite.java new file mode 100644 index 0000000..b41ce51 --- /dev/null +++ b/test/type/detect/kb/freebase/FreebaseSuite.java @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.freebase; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class FreebaseSuite extends TestCase { + + public FreebaseSuite(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite("FreebaseSuite"); + suite.addTest(FreebaseUtilTest.suite()); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/test/type/detect/kb/freebase/FreebaseUtilTest.java b/test/type/detect/kb/freebase/FreebaseUtilTest.java new file mode 100644 index 0000000..ed55fdf --- /dev/null +++ b/test/type/detect/kb/freebase/FreebaseUtilTest.java @@ -0,0 +1,79 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.freebase; + +import java.util.Map; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import net.sf.json.JSONArray; + +/** + * + * @author Amir + */ +public class FreebaseUtilTest extends TestCase { + + public FreebaseUtilTest(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(FreebaseUtilTest.class); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of main method, of class FreebaseUtil. + */ + public void testMain() { + System.out.println("main"); + String[] args = null; + FreebaseUtil.main(args); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of search method, of class FreebaseUtil. + */ + public void testSearch() { + System.out.println("search"); + String query = ""; + String mql_query_file = ""; + int limit = 0; + JSONArray expResult = null; + JSONArray result = FreebaseUtil.search(query, mql_query_file, limit); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of fetch method, of class FreebaseUtil. + */ + public void testFetch() { + System.out.println("fetch"); + String query_template_file = ""; + Map params = null; + JSONArray expResult = null; + JSONArray result = FreebaseUtil.fetch(query_template_file, params); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/knowledgegraph/KnowledgeGraphUtilTest.java b/test/type/detect/kb/knowledgegraph/KnowledgeGraphUtilTest.java new file mode 100644 index 0000000..2cd5223 --- /dev/null +++ b/test/type/detect/kb/knowledgegraph/KnowledgeGraphUtilTest.java @@ -0,0 +1,75 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.knowledgegraph; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +import org.json.simple.JSONArray; + +/** + * + * @author Amir + */ +public class KnowledgeGraphUtilTest extends TestCase { + + public KnowledgeGraphUtilTest(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(KnowledgeGraphUtilTest.class); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of main method, of class KnowledgeGraphUtil. + */ + public void testMain() { + System.out.println("main"); + String[] args = null; + KnowledgeGraphUtil.main(args); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getType method, of class KnowledgeGraphUtil. + */ + public void testGetType() { + System.out.println("getType"); + String query = ""; + String expResult = ""; + String result = KnowledgeGraphUtil.getType(query); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getResult method, of class KnowledgeGraphUtil. + */ + public void testGetResult() { + System.out.println("getResult"); + String query = ""; + JSONArray expResult = null; + JSONArray result = KnowledgeGraphUtil.getResult(query); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/knowledgegraph/KnowledgegraphSuite.java b/test/type/detect/kb/knowledgegraph/KnowledgegraphSuite.java new file mode 100644 index 0000000..3f9d39c --- /dev/null +++ b/test/type/detect/kb/knowledgegraph/KnowledgegraphSuite.java @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.knowledgegraph; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class KnowledgegraphSuite extends TestCase { + + public KnowledgegraphSuite(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite("KnowledgegraphSuite"); + suite.addTest(KnowledgeGraphUtilTest.suite()); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/test/type/detect/kb/sparql/SparqlConsumerTest.java b/test/type/detect/kb/sparql/SparqlConsumerTest.java new file mode 100644 index 0000000..dad0012 --- /dev/null +++ b/test/type/detect/kb/sparql/SparqlConsumerTest.java @@ -0,0 +1,60 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.sparql; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class SparqlConsumerTest extends TestCase { + + public SparqlConsumerTest(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(SparqlConsumerTest.class); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of main method, of class SparqlConsumer. + */ + public void testMain() { + System.out.println("main"); + String[] args = null; + SparqlConsumer.main(args); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of query method, of class SparqlConsumer. + */ + public void testQuery() { + System.out.println("query"); + String endpoint = ""; + String query = ""; + SparqlConsumer.query(endpoint, query); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/sparql/SparqlSuite.java b/test/type/detect/kb/sparql/SparqlSuite.java new file mode 100644 index 0000000..7dfa0db --- /dev/null +++ b/test/type/detect/kb/sparql/SparqlSuite.java @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.sparql; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class SparqlSuite extends TestCase { + + public SparqlSuite(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite("SparqlSuite"); + suite.addTest(SparqlConsumerTest.suite()); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/test/type/detect/kb/wikidata/WikiDataConsumerTest.java b/test/type/detect/kb/wikidata/WikiDataConsumerTest.java new file mode 100644 index 0000000..a902b55 --- /dev/null +++ b/test/type/detect/kb/wikidata/WikiDataConsumerTest.java @@ -0,0 +1,128 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.wikidata; + +import java.util.List; +import java.util.Map; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class WikiDataConsumerTest extends TestCase { + + public WikiDataConsumerTest(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(WikiDataConsumerTest.class); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of main method, of class WikiDataConsumer. + */ + public void testMain() { + System.out.println("main"); + String[] args = null; + WikiDataConsumer.main(args); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getTypes method, of class WikiDataConsumer. + */ + public void testGetTypes_List() { + System.out.println("getTypes"); + List terms = null; + Map expResult = null; + Map result = WikiDataConsumer.getTypes(terms); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getTypes method, of class WikiDataConsumer. + */ + public void testGetTypes_String() { + System.out.println("getTypes"); + String term = ""; + Map expResult = null; + Map result = WikiDataConsumer.getTypes(term); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getBestType method, of class WikiDataConsumer. + */ + public void testGetBestType_String() { + System.out.println("getBestType"); + String term = ""; + String expResult = ""; + String result = WikiDataConsumer.getBestType(term); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getBestType method, of class WikiDataConsumer. + */ + public void testGetBestType_List() { + System.out.println("getBestType"); + List terms = null; + String expResult = ""; + String result = WikiDataConsumer.getBestType(terms); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of recognizeTypesForID method, of class WikiDataConsumer. + */ + public void testRecognizeTypesForID() { + System.out.println("recognizeTypesForID"); + String id = ""; + List expResult = null; + List result = WikiDataConsumer.recognizeTypesForID(id); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of search method, of class WikiDataConsumer. + */ + public void testSearch() { + System.out.println("search"); + String query = ""; + List expResult = null; + List result = WikiDataConsumer.search(query); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/wikidata/WikiDataSearchEntityTest.java b/test/type/detect/kb/wikidata/WikiDataSearchEntityTest.java new file mode 100644 index 0000000..f571d04 --- /dev/null +++ b/test/type/detect/kb/wikidata/WikiDataSearchEntityTest.java @@ -0,0 +1,150 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.wikidata; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class WikiDataSearchEntityTest extends TestCase { + + public WikiDataSearchEntityTest(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite(WikiDataSearchEntityTest.class); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Test of getId method, of class WikiDataSearchEntity. + */ + public void testGetId() { + System.out.println("getId"); + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + String expResult = ""; + String result = instance.getId(); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of setId method, of class WikiDataSearchEntity. + */ + public void testSetId() { + System.out.println("setId"); + String id = ""; + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + instance.setId(id); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getUrl method, of class WikiDataSearchEntity. + */ + public void testGetUrl() { + System.out.println("getUrl"); + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + String expResult = ""; + String result = instance.getUrl(); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of setUrl method, of class WikiDataSearchEntity. + */ + public void testSetUrl() { + System.out.println("setUrl"); + String url = ""; + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + instance.setUrl(url); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getLabel method, of class WikiDataSearchEntity. + */ + public void testGetLabel() { + System.out.println("getLabel"); + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + String expResult = ""; + String result = instance.getLabel(); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of setLabel method, of class WikiDataSearchEntity. + */ + public void testSetLabel() { + System.out.println("setLabel"); + String label = ""; + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + instance.setLabel(label); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of getType method, of class WikiDataSearchEntity. + */ + public void testGetType() { + System.out.println("getType"); + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + String expResult = ""; + String result = instance.getType(); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of setType method, of class WikiDataSearchEntity. + */ + public void testSetType() { + System.out.println("setType"); + String type = ""; + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + instance.setType(type); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + + /** + * Test of toString method, of class WikiDataSearchEntity. + */ + public void testToString() { + System.out.println("toString"); + WikiDataSearchEntity instance = new WikiDataSearchEntity(); + String expResult = ""; + String result = instance.toString(); + assertEquals(expResult, result); + // TODO review the generated test code and remove the default call to fail. + fail("The test case is a prototype."); + } + +} diff --git a/test/type/detect/kb/wikidata/WikidataSuite.java b/test/type/detect/kb/wikidata/WikidataSuite.java new file mode 100644 index 0000000..dacbc06 --- /dev/null +++ b/test/type/detect/kb/wikidata/WikidataSuite.java @@ -0,0 +1,39 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package type.detect.kb.wikidata; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * + * @author Amir + */ +public class WikidataSuite extends TestCase { + + public WikidataSuite(String testName) { + super(testName); + } + + public static Test suite() { + TestSuite suite = new TestSuite("WikidataSuite"); + suite.addTest(WikiDataSearchEntityTest.suite()); + suite.addTest(WikiDataConsumerTest.suite()); + return suite; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + +}