Comments (3)
I'm having the same issue. Did you ever find a solution?
Thank you.
from php-class-stanford-pos-tagger.
Finally, I found a solution. My OS is windows 10.
And I use the jar file of version 3.3.1 (released at 2014-01-04) from http://nlp.stanford.edu/software/tagger.shtml.
(I tried new version, but it's not work. So i recommend version 3.3.1)
I just changed the line 71 from $tmp_path = '/tmp' to $tmp_path = './temp' in class_Stanford_POS_Tagger.php file.
And then make a new folder in my work folder which contains test.php, class_Stanford_POS_Tagger.php, Stanford jar file and so on (i.e., i use same folder for all files).
The new folder's name is temp. This new tem_path is relative path (i.e., it is path of my folder, not tmp folder of windows).
And it is working now :)
My guess is that the problem related with permission of windows.
And then, my test source is following as:
require('class_Stanford_POS_Tagger.php');
$pos = new Stanford_POS_Tagger();
var_dump($pos->array_tag("The cow jumped over the moon and."));
Thank you for Charles Hays.
from php-class-stanford-pos-tagger.
And If you want to use your php file in different folder of class_Stanford_POS_Tagger php file.
You have to input this code $this->set_tmp_path($path); at __construct function in class_Stanford_POS_Tagger php file after setting the path.
And then, test source is following as:
require('NLP_stanford/class_Stanford_POS_Tagger.php');
$pos = new Stanford_POS_Tagger(DIR.'/NLP_stanford');
var_dump($pos->array_tag("The cow jumped over the moon and."));
I hope it help for you.
from php-class-stanford-pos-tagger.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-class-stanford-pos-tagger.