Hi all...
How to import Semantic class used Jython in Python?
here my java code..

JAVA CODE
----------------
import java.text.BreakIterator ;

class Semantic {

  // native C++ method
  //public native void printMessage( String message );
    public native String printMessage( String message );
  // load library JNIPrintMessage into JVM
  static {
     System.loadLibrary( "JNIPrintMessage" );
  }


     public static void main(String [] args) {

      String l = "i go to school";
      pilih_ayat(l);


         }

     public static String pilih_ayat(String n){

           JNIPrintWrapper wrapper = new JNIPrintWrapper();

              String ayat_siap =  wrapper.printMessage(n);
           System.out.println("output >>" + ayat_siap);
           return n;
       }//end pilih ayat


     public Semantic(){
         System.out.println ("Berjaya");
     }
}//end class

JAVA OUTPUT
--------------------
output >> (S(NLP i) (VP go(PP to(NLP school))))
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to