Commit 4780ee9ce5ee21a76e72af5133581cd40eecd7f3
1 parent
0e62acc5
- praca nad paczkowaniem pythona do .deb
- porządki w paczkowaniu Javy (wyrzucenie mavenowej maszynerii, użycie tylko cmake-owego add_jar) git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@69 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing
15 changed files
with
0 additions
and
629 deletions
jmorfeusz/src/main/assembly/bin.xml deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | |
3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
4 | - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | |
5 | - <formats> | |
6 | - <format>tar.gz</format> | |
7 | - <!-- <format>tar.bz2</format> | |
8 | - <format>zip</format>--> | |
9 | - </formats> | |
10 | - <fileSets> | |
11 | - <fileSet> | |
12 | - <directory>src/main/resources</directory> | |
13 | - <outputDirectory>/</outputDirectory> | |
14 | - <includes> | |
15 | - <include>README*</include> | |
16 | - </includes> | |
17 | - </fileSet> | |
18 | - <fileSet> | |
19 | - <directory>${outputDir}</directory> | |
20 | - <outputDirectory>/</outputDirectory> | |
21 | - <includes> | |
22 | - <include>*.jar</include> | |
23 | - <include>*.so</include> | |
24 | - <include>*.dll</include> | |
25 | - <include>*.dylib</include> | |
26 | - <include>*.jnilib</include> | |
27 | - </includes> | |
28 | - </fileSet> | |
29 | - </fileSets> | |
30 | -</assembly> |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/InterpsVector.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class InterpsVector { | |
12 | - private long swigCPtr; | |
13 | - protected boolean swigCMemOwn; | |
14 | - | |
15 | - public InterpsVector(long cPtr, boolean cMemoryOwn) { | |
16 | - swigCMemOwn = cMemoryOwn; | |
17 | - swigCPtr = cPtr; | |
18 | - } | |
19 | - | |
20 | - public static long getCPtr(InterpsVector obj) { | |
21 | - return (obj == null) ? 0 : obj.swigCPtr; | |
22 | - } | |
23 | - | |
24 | - protected void finalize() { | |
25 | - delete(); | |
26 | - } | |
27 | - | |
28 | - public synchronized void delete() { | |
29 | - if (swigCPtr != 0) { | |
30 | - if (swigCMemOwn) { | |
31 | - swigCMemOwn = false; | |
32 | - MorfeuszWrapperJNI.delete_InterpsVector(swigCPtr); | |
33 | - } | |
34 | - swigCPtr = 0; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - public InterpsVector() { | |
39 | - this(MorfeuszWrapperJNI.new_InterpsVector(), true); | |
40 | - } | |
41 | - | |
42 | - public long size() { | |
43 | - return MorfeuszWrapperJNI.InterpsVector_size(swigCPtr, this); | |
44 | - } | |
45 | - | |
46 | - public long capacity() { | |
47 | - return MorfeuszWrapperJNI.InterpsVector_capacity(swigCPtr, this); | |
48 | - } | |
49 | - | |
50 | - public void reserve(long n) { | |
51 | - MorfeuszWrapperJNI.InterpsVector_reserve(swigCPtr, this, n); | |
52 | - } | |
53 | - | |
54 | - public boolean isEmpty() { | |
55 | - return MorfeuszWrapperJNI.InterpsVector_isEmpty(swigCPtr, this); | |
56 | - } | |
57 | - | |
58 | - public void clear() { | |
59 | - MorfeuszWrapperJNI.InterpsVector_clear(swigCPtr, this); | |
60 | - } | |
61 | - | |
62 | - public void add(MorphInterpretation x) { | |
63 | - MorfeuszWrapperJNI.InterpsVector_add(swigCPtr, this, MorphInterpretation.getCPtr(x), x); | |
64 | - } | |
65 | - | |
66 | - public MorphInterpretation get(int i) { | |
67 | - return new MorphInterpretation(MorfeuszWrapperJNI.InterpsVector_get(swigCPtr, this, i), false); | |
68 | - } | |
69 | - | |
70 | - public void set(int i, MorphInterpretation val) { | |
71 | - MorfeuszWrapperJNI.InterpsVector_set(swigCPtr, this, i, MorphInterpretation.getCPtr(val), val); | |
72 | - } | |
73 | - | |
74 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/Morfeusz.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class Morfeusz { | |
12 | - private long swigCPtr; | |
13 | - protected boolean swigCMemOwn; | |
14 | - | |
15 | - public Morfeusz(long cPtr, boolean cMemoryOwn) { | |
16 | - swigCMemOwn = cMemoryOwn; | |
17 | - swigCPtr = cPtr; | |
18 | - } | |
19 | - | |
20 | - public static long getCPtr(Morfeusz obj) { | |
21 | - return (obj == null) ? 0 : obj.swigCPtr; | |
22 | - } | |
23 | - | |
24 | - protected void finalize() { | |
25 | - delete(); | |
26 | - } | |
27 | - | |
28 | - public synchronized void delete() { | |
29 | - if (swigCPtr != 0) { | |
30 | - if (swigCMemOwn) { | |
31 | - swigCMemOwn = false; | |
32 | - MorfeuszWrapperJNI.delete_Morfeusz(swigCPtr); | |
33 | - } | |
34 | - swigCPtr = 0; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - public Morfeusz() { | |
39 | - this(MorfeuszWrapperJNI.new_Morfeusz__SWIG_0(), true); | |
40 | - } | |
41 | - | |
42 | - public Morfeusz(String filename) { | |
43 | - this(MorfeuszWrapperJNI.new_Morfeusz__SWIG_1(filename), true); | |
44 | - } | |
45 | - | |
46 | - public ResultsIterator analyze(String text) { | |
47 | - return new ResultsIterator(MorfeuszWrapperJNI.Morfeusz_analyze__SWIG_0(swigCPtr, this, text), true); | |
48 | - } | |
49 | - | |
50 | - public void analyze(String text, InterpsVector result) { | |
51 | - MorfeuszWrapperJNI.Morfeusz_analyze__SWIG_1(swigCPtr, this, text, InterpsVector.getCPtr(result), result); | |
52 | - } | |
53 | - | |
54 | - public void setEncoding(MorfeuszCharset encoding) { | |
55 | - MorfeuszWrapperJNI.Morfeusz_setEncoding(swigCPtr, this, encoding.swigValue()); | |
56 | - } | |
57 | - | |
58 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszCharset.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public enum MorfeuszCharset { | |
12 | - UTF8, | |
13 | - ISO8859_2, | |
14 | - CP1250, | |
15 | - CP852; | |
16 | - | |
17 | - public final int swigValue() { | |
18 | - return swigValue; | |
19 | - } | |
20 | - | |
21 | - public static MorfeuszCharset swigToEnum(int swigValue) { | |
22 | - MorfeuszCharset[] swigValues = MorfeuszCharset.class.getEnumConstants(); | |
23 | - if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) | |
24 | - return swigValues[swigValue]; | |
25 | - for (MorfeuszCharset swigEnum : swigValues) | |
26 | - if (swigEnum.swigValue == swigValue) | |
27 | - return swigEnum; | |
28 | - throw new IllegalArgumentException("No enum " + MorfeuszCharset.class + " with value " + swigValue); | |
29 | - } | |
30 | - | |
31 | - @SuppressWarnings("unused") | |
32 | - private MorfeuszCharset() { | |
33 | - this.swigValue = SwigNext.next++; | |
34 | - } | |
35 | - | |
36 | - @SuppressWarnings("unused") | |
37 | - private MorfeuszCharset(int swigValue) { | |
38 | - this.swigValue = swigValue; | |
39 | - SwigNext.next = swigValue+1; | |
40 | - } | |
41 | - | |
42 | - @SuppressWarnings("unused") | |
43 | - private MorfeuszCharset(MorfeuszCharset swigEnum) { | |
44 | - this.swigValue = swigEnum.swigValue; | |
45 | - SwigNext.next = this.swigValue+1; | |
46 | - } | |
47 | - | |
48 | - private final int swigValue; | |
49 | - | |
50 | - private static class SwigNext { | |
51 | - private static int next = 0; | |
52 | - } | |
53 | -} | |
54 | - |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszException.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class MorfeuszException { | |
12 | - private long swigCPtr; | |
13 | - protected boolean swigCMemOwn; | |
14 | - | |
15 | - public MorfeuszException(long cPtr, boolean cMemoryOwn) { | |
16 | - swigCMemOwn = cMemoryOwn; | |
17 | - swigCPtr = cPtr; | |
18 | - } | |
19 | - | |
20 | - public static long getCPtr(MorfeuszException obj) { | |
21 | - return (obj == null) ? 0 : obj.swigCPtr; | |
22 | - } | |
23 | - | |
24 | - protected void finalize() { | |
25 | - delete(); | |
26 | - } | |
27 | - | |
28 | - public synchronized void delete() { | |
29 | - if (swigCPtr != 0) { | |
30 | - if (swigCMemOwn) { | |
31 | - swigCMemOwn = false; | |
32 | - MorfeuszWrapperJNI.delete_MorfeuszException(swigCPtr); | |
33 | - } | |
34 | - swigCPtr = 0; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - public MorfeuszException(String what) { | |
39 | - this(MorfeuszWrapperJNI.new_MorfeuszException(what), true); | |
40 | - } | |
41 | - | |
42 | - public String what() { | |
43 | - return MorfeuszWrapperJNI.MorfeuszException_what(swigCPtr, this); | |
44 | - } | |
45 | - | |
46 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszWrapper.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class MorfeuszWrapper { | |
12 | - public static MorfeuszCharset getDEFAULT_MORFEUSZ_CHARSET() { | |
13 | - return MorfeuszCharset.swigToEnum(MorfeuszWrapperJNI.DEFAULT_MORFEUSZ_CHARSET_get()); | |
14 | - } | |
15 | - | |
16 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszWrapperJNI.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class MorfeuszWrapperJNI { | |
12 | - | |
13 | - static { | |
14 | - System.loadLibrary("jmorfeusz"); | |
15 | - } | |
16 | - | |
17 | - public final static native long new_MorfeuszException(String jarg1); | |
18 | - public final static native void delete_MorfeuszException(long jarg1); | |
19 | - public final static native String MorfeuszException_what(long jarg1, MorfeuszException jarg1_); | |
20 | - public final static native long new_Morfeusz__SWIG_0(); | |
21 | - public final static native long new_Morfeusz__SWIG_1(String jarg1); | |
22 | - public final static native void delete_Morfeusz(long jarg1); | |
23 | - public final static native long Morfeusz_analyze__SWIG_0(long jarg1, Morfeusz jarg1_, String jarg2); | |
24 | - public final static native void Morfeusz_analyze__SWIG_1(long jarg1, Morfeusz jarg1_, String jarg2, long jarg3, InterpsVector jarg3_); | |
25 | - public final static native void Morfeusz_setEncoding(long jarg1, Morfeusz jarg1_, int jarg2); | |
26 | - public final static native long ResultsIterator_getNext(long jarg1, ResultsIterator jarg1_); | |
27 | - public final static native boolean ResultsIterator_hasNext(long jarg1, ResultsIterator jarg1_); | |
28 | - public final static native void delete_ResultsIterator(long jarg1); | |
29 | - public final static native int MorphInterpretation_getStartNode(long jarg1, MorphInterpretation jarg1_); | |
30 | - public final static native int MorphInterpretation_getEndNode(long jarg1, MorphInterpretation jarg1_); | |
31 | - public final static native String MorphInterpretation_getOrth(long jarg1, MorphInterpretation jarg1_); | |
32 | - public final static native String MorphInterpretation_getLemma(long jarg1, MorphInterpretation jarg1_); | |
33 | - public final static native int MorphInterpretation_getTagnum(long jarg1, MorphInterpretation jarg1_); | |
34 | - public final static native int MorphInterpretation_getNamenum(long jarg1, MorphInterpretation jarg1_); | |
35 | - public final static native String MorphInterpretation_getTag(long jarg1, MorphInterpretation jarg1_); | |
36 | - public final static native String MorphInterpretation_getName(long jarg1, MorphInterpretation jarg1_); | |
37 | - public final static native void delete_MorphInterpretation(long jarg1); | |
38 | - public final static native int DEFAULT_MORFEUSZ_CHARSET_get(); | |
39 | - public final static native long new_InterpsVector(); | |
40 | - public final static native long InterpsVector_size(long jarg1, InterpsVector jarg1_); | |
41 | - public final static native long InterpsVector_capacity(long jarg1, InterpsVector jarg1_); | |
42 | - public final static native void InterpsVector_reserve(long jarg1, InterpsVector jarg1_, long jarg2); | |
43 | - public final static native boolean InterpsVector_isEmpty(long jarg1, InterpsVector jarg1_); | |
44 | - public final static native void InterpsVector_clear(long jarg1, InterpsVector jarg1_); | |
45 | - public final static native void InterpsVector_add(long jarg1, InterpsVector jarg1_, long jarg2, MorphInterpretation jarg2_); | |
46 | - public final static native long InterpsVector_get(long jarg1, InterpsVector jarg1_, int jarg2); | |
47 | - public final static native void InterpsVector_set(long jarg1, InterpsVector jarg1_, int jarg2, long jarg3, MorphInterpretation jarg3_); | |
48 | - public final static native void delete_InterpsVector(long jarg1); | |
49 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorphInterpretation.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class MorphInterpretation { | |
12 | - private long swigCPtr; | |
13 | - protected boolean swigCMemOwn; | |
14 | - | |
15 | - public MorphInterpretation(long cPtr, boolean cMemoryOwn) { | |
16 | - swigCMemOwn = cMemoryOwn; | |
17 | - swigCPtr = cPtr; | |
18 | - } | |
19 | - | |
20 | - public static long getCPtr(MorphInterpretation obj) { | |
21 | - return (obj == null) ? 0 : obj.swigCPtr; | |
22 | - } | |
23 | - | |
24 | - protected void finalize() { | |
25 | - delete(); | |
26 | - } | |
27 | - | |
28 | - public synchronized void delete() { | |
29 | - if (swigCPtr != 0) { | |
30 | - if (swigCMemOwn) { | |
31 | - swigCMemOwn = false; | |
32 | - MorfeuszWrapperJNI.delete_MorphInterpretation(swigCPtr); | |
33 | - } | |
34 | - swigCPtr = 0; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - public int getStartNode() { | |
39 | - return MorfeuszWrapperJNI.MorphInterpretation_getStartNode(swigCPtr, this); | |
40 | - } | |
41 | - | |
42 | - public int getEndNode() { | |
43 | - return MorfeuszWrapperJNI.MorphInterpretation_getEndNode(swigCPtr, this); | |
44 | - } | |
45 | - | |
46 | - public String getOrth() { | |
47 | - return MorfeuszWrapperJNI.MorphInterpretation_getOrth(swigCPtr, this); | |
48 | - } | |
49 | - | |
50 | - public String getLemma() { | |
51 | - return MorfeuszWrapperJNI.MorphInterpretation_getLemma(swigCPtr, this); | |
52 | - } | |
53 | - | |
54 | - public int getTagnum() { | |
55 | - return MorfeuszWrapperJNI.MorphInterpretation_getTagnum(swigCPtr, this); | |
56 | - } | |
57 | - | |
58 | - public int getNamenum() { | |
59 | - return MorfeuszWrapperJNI.MorphInterpretation_getNamenum(swigCPtr, this); | |
60 | - } | |
61 | - | |
62 | - public String getTag() { | |
63 | - return MorfeuszWrapperJNI.MorphInterpretation_getTag(swigCPtr, this); | |
64 | - } | |
65 | - | |
66 | - public String getName() { | |
67 | - return MorfeuszWrapperJNI.MorphInterpretation_getName(swigCPtr, this); | |
68 | - } | |
69 | - | |
70 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/ResultsIterator.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.4 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class ResultsIterator { | |
12 | - private long swigCPtr; | |
13 | - protected boolean swigCMemOwn; | |
14 | - | |
15 | - public ResultsIterator(long cPtr, boolean cMemoryOwn) { | |
16 | - swigCMemOwn = cMemoryOwn; | |
17 | - swigCPtr = cPtr; | |
18 | - } | |
19 | - | |
20 | - public static long getCPtr(ResultsIterator obj) { | |
21 | - return (obj == null) ? 0 : obj.swigCPtr; | |
22 | - } | |
23 | - | |
24 | - protected void finalize() { | |
25 | - delete(); | |
26 | - } | |
27 | - | |
28 | - public synchronized void delete() { | |
29 | - if (swigCPtr != 0) { | |
30 | - if (swigCMemOwn) { | |
31 | - swigCMemOwn = false; | |
32 | - MorfeuszWrapperJNI.delete_ResultsIterator(swigCPtr); | |
33 | - } | |
34 | - swigCPtr = 0; | |
35 | - } | |
36 | - } | |
37 | - | |
38 | - public MorphInterpretation getNext() { | |
39 | - return new MorphInterpretation(MorfeuszWrapperJNI.ResultsIterator_getNext(swigCPtr, this), true); | |
40 | - } | |
41 | - | |
42 | - public boolean hasNext() { | |
43 | - return MorfeuszWrapperJNI.ResultsIterator_hasNext(swigCPtr, this); | |
44 | - } | |
45 | - | |
46 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/app/App.java deleted
1 | -package pl.waw.ipipan.morfeusz.app; | |
2 | - | |
3 | -import pl.waw.ipipan.morfeusz.Morfeusz; | |
4 | -import pl.waw.ipipan.morfeusz.ResultsIterator; | |
5 | -import pl.waw.ipipan.morfeusz.utils.MorfeuszUtils; | |
6 | - | |
7 | -/** | |
8 | - * Hello world! | |
9 | - * | |
10 | - */ | |
11 | -public class App { | |
12 | - | |
13 | - public static void main(String[] args) { | |
14 | - System.err.println("Working Directory = " + | |
15 | - System.getProperty("user.dir")); | |
16 | - System.err.println("java.library.path="+System.getProperty("java.library.path")); | |
17 | - Morfeusz morfeusz = new Morfeusz(); | |
18 | - ResultsIterator it = morfeusz.analyze("Ala ma kota i żółć."); | |
19 | - while (it.hasNext()) { | |
20 | - System.out.println(MorfeuszUtils.getInterpretationString(it.getNext())); | |
21 | - } | |
22 | - } | |
23 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/morfeusz.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.10 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class morfeusz { | |
12 | - public static MorfeuszCharset getDEFAULT_MORFEUSZ_CHARSET() { | |
13 | - return MorfeuszCharset.swigToEnum(morfeuszJNI.DEFAULT_MORFEUSZ_CHARSET_get()); | |
14 | - } | |
15 | - | |
16 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/morfeuszJNI.java deleted
1 | -/* ---------------------------------------------------------------------------- | |
2 | - * This file was automatically generated by SWIG (http://www.swig.org). | |
3 | - * Version 2.0.10 | |
4 | - * | |
5 | - * Do not make changes to this file unless you know what you are doing--modify | |
6 | - * the SWIG interface file instead. | |
7 | - * ----------------------------------------------------------------------------- */ | |
8 | - | |
9 | -package pl.waw.ipipan.morfeusz; | |
10 | - | |
11 | -public class morfeuszJNI { | |
12 | - | |
13 | - static { | |
14 | - System.loadLibrary("jmorfeusz"); | |
15 | - } | |
16 | - | |
17 | - public final static native long new_MorfeuszException(String jarg1); | |
18 | - public final static native void delete_MorfeuszException(long jarg1); | |
19 | - public final static native String MorfeuszException_what(long jarg1, MorfeuszException jarg1_); | |
20 | - public final static native long new_Morfeusz__SWIG_0(); | |
21 | - public final static native long new_Morfeusz__SWIG_1(String jarg1); | |
22 | - public final static native void delete_Morfeusz(long jarg1); | |
23 | - public final static native long Morfeusz_analyze__SWIG_0(long jarg1, Morfeusz jarg1_, String jarg2); | |
24 | - public final static native void Morfeusz_analyze__SWIG_1(long jarg1, Morfeusz jarg1_, String jarg2, long jarg3, InterpsVector jarg3_); | |
25 | - public final static native void Morfeusz_setEncoding(long jarg1, Morfeusz jarg1_, int jarg2); | |
26 | - public final static native long ResultsIterator_getNext(long jarg1, ResultsIterator jarg1_); | |
27 | - public final static native boolean ResultsIterator_hasNext(long jarg1, ResultsIterator jarg1_); | |
28 | - public final static native void delete_ResultsIterator(long jarg1); | |
29 | - public final static native int MorphInterpretation_getStartNode(long jarg1, MorphInterpretation jarg1_); | |
30 | - public final static native int MorphInterpretation_getEndNode(long jarg1, MorphInterpretation jarg1_); | |
31 | - public final static native String MorphInterpretation_getOrth(long jarg1, MorphInterpretation jarg1_); | |
32 | - public final static native String MorphInterpretation_getLemma(long jarg1, MorphInterpretation jarg1_); | |
33 | - public final static native int MorphInterpretation_getTagnum(long jarg1, MorphInterpretation jarg1_); | |
34 | - public final static native int MorphInterpretation_getNamenum(long jarg1, MorphInterpretation jarg1_); | |
35 | - public final static native String MorphInterpretation_getTag(long jarg1, MorphInterpretation jarg1_); | |
36 | - public final static native String MorphInterpretation_getName(long jarg1, MorphInterpretation jarg1_); | |
37 | - public final static native void delete_MorphInterpretation(long jarg1); | |
38 | - public final static native int DEFAULT_MORFEUSZ_CHARSET_get(); | |
39 | - public final static native long new_InterpsVector(); | |
40 | - public final static native long InterpsVector_size(long jarg1, InterpsVector jarg1_); | |
41 | - public final static native long InterpsVector_capacity(long jarg1, InterpsVector jarg1_); | |
42 | - public final static native void InterpsVector_reserve(long jarg1, InterpsVector jarg1_, long jarg2); | |
43 | - public final static native boolean InterpsVector_isEmpty(long jarg1, InterpsVector jarg1_); | |
44 | - public final static native void InterpsVector_clear(long jarg1, InterpsVector jarg1_); | |
45 | - public final static native void InterpsVector_add(long jarg1, InterpsVector jarg1_, long jarg2, MorphInterpretation jarg2_); | |
46 | - public final static native long InterpsVector_get(long jarg1, InterpsVector jarg1_, int jarg2); | |
47 | - public final static native void InterpsVector_set(long jarg1, InterpsVector jarg1_, int jarg2, long jarg3, MorphInterpretation jarg3_); | |
48 | - public final static native void delete_InterpsVector(long jarg1); | |
49 | -} |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/utils/MorfeuszUtils.java deleted
1 | -package pl.waw.ipipan.morfeusz.utils; | |
2 | - | |
3 | -import java.io.ByteArrayOutputStream; | |
4 | -import java.io.PrintStream; | |
5 | -import pl.waw.ipipan.morfeusz.MorphInterpretation; | |
6 | - | |
7 | -/** | |
8 | - * | |
9 | - * @author mlenart | |
10 | - */ | |
11 | -public class MorfeuszUtils { | |
12 | - | |
13 | - public static String getInterpretationString(MorphInterpretation interp) { | |
14 | - ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
15 | - PrintStream ps = new PrintStream(baos); | |
16 | - ps.printf("%d %d %s %s %s %s", | |
17 | - interp.getStartNode(), | |
18 | - interp.getEndNode(), | |
19 | - interp.getOrth(), | |
20 | - interp.getLemma(), | |
21 | - interp.getTag(), | |
22 | - interp.getName()); | |
23 | - ps.flush(); | |
24 | - return baos.toString(); | |
25 | - } | |
26 | -} |
jmorfeusz/src/main/resources/README deleted
jmorfeusz/src/test/java/pl/waw/ipipan/morfeusz/TestMorfeusz.java deleted
1 | -package pl.waw.ipipan.morfeusz; | |
2 | - | |
3 | -import org.junit.After; | |
4 | -import org.junit.AfterClass; | |
5 | -import org.junit.Before; | |
6 | -import org.junit.BeforeClass; | |
7 | -import org.junit.Test; | |
8 | -import static org.junit.Assert.*; | |
9 | - | |
10 | -/** | |
11 | - * | |
12 | - * @author mlenart | |
13 | - */ | |
14 | -public class TestMorfeusz { | |
15 | - | |
16 | - public TestMorfeusz() { | |
17 | - } | |
18 | - | |
19 | - @BeforeClass | |
20 | - public static void setUpClass() { | |
21 | - } | |
22 | - | |
23 | - @AfterClass | |
24 | - public static void tearDownClass() { | |
25 | - } | |
26 | - | |
27 | - @Before | |
28 | - public void setUp() { | |
29 | - } | |
30 | - | |
31 | - @After | |
32 | - public void tearDown() { | |
33 | - } | |
34 | - | |
35 | - @Test | |
36 | - public void testSimpleRecognize() { | |
37 | - System.err.println("START TEST testSimpleRecognize"); | |
38 | - Morfeusz morfeusz = new Morfeusz(); | |
39 | - InterpsVector iv = new InterpsVector(); | |
40 | - morfeusz.analyze("ż", iv); | |
41 | - assertEquals(1, iv.size()); | |
42 | - assertEquals(0, iv.get(0).getStartNode()); | |
43 | - assertEquals(1, iv.get(0).getEndNode()); | |
44 | - assertEquals("ż", iv.get(0).getOrth()); | |
45 | - assertEquals("+ż", iv.get(0).getLemma()); | |
46 | - assertEquals("qub", iv.get(0).getTag()); | |
47 | - assertEquals("pospolita", iv.get(0).getName()); | |
48 | - System.err.println("DONE testSimpleRecognize"); | |
49 | - } | |
50 | - | |
51 | - @Test | |
52 | - public void testIgn() { | |
53 | - System.err.println("START TEST testIgn"); | |
54 | - Morfeusz morfeusz = new Morfeusz(); | |
55 | - InterpsVector iv = new InterpsVector(); | |
56 | - morfeusz.analyze("ą", iv); | |
57 | - assertEquals(1, iv.size()); | |
58 | - assertEquals(0, iv.get(0).getStartNode()); | |
59 | - assertEquals(1, iv.get(0).getEndNode()); | |
60 | - assertEquals("ą", iv.get(0).getOrth()); | |
61 | - assertEquals("ą", iv.get(0).getLemma()); | |
62 | - assertEquals("ign", iv.get(0).getTag()); | |
63 | - assertEquals("", iv.get(0).getName()); | |
64 | - System.err.println("DONE testIgn"); | |
65 | - } | |
66 | -} |