Dear friends,
In data mining works we usually used to call java class files. Sometimes from PHP.
Try this code to invoke a Java program or some other jar executables from your PHP
Sample 1.
<?php
exec("java Apriori hup.dat 0.4 > hupa.txt");
?>
The above code will run Apriory.class with hup.dat as input file and the output will be saved in hupa.txt which can be further processed by PHP data mining program.
Sample 2.
<?php
exec("java -jar LDA/jar/jLDADMM.jar -model LDA -corpus LDA/test/corpus.txt -name testLDA -ntopics 5 -twords 5 > huplda.txt");
?>
The above code will run a jar file for LDA topic modeling algorithm stored in LDA/jar/ folder in www directory of LAMP or WAMP or XAMPP with lot of switches and output can be redirected to huplda.txt file.
In data mining works we usually used to call java class files. Sometimes from PHP.
Try this code to invoke a Java program or some other jar executables from your PHP
Sample 1.
<?php
exec("java Apriori hup.dat 0.4 > hupa.txt");
?>
The above code will run Apriory.class with hup.dat as input file and the output will be saved in hupa.txt which can be further processed by PHP data mining program.
Sample 2.
<?php
exec("java -jar LDA/jar/jLDADMM.jar -model LDA -corpus LDA/test/corpus.txt -name testLDA -ntopics 5 -twords 5 > huplda.txt");
?>
The above code will run a jar file for LDA topic modeling algorithm stored in LDA/jar/ folder in www directory of LAMP or WAMP or XAMPP with lot of switches and output can be redirected to huplda.txt file.
No comments:
Post a Comment