File Exchange

image thumbnail

Matlab Stanford postagger for a text document

version 1.0.0.0 (1.42 KB) by Rujbir Pabla
Tool to run Stanford POS tagger on an input text document and the save the output to a text file.

0 Downloads

Updated 08 Feb 2016

View License

Set of files to run Stanford POS tagger on an input text document and save the output to a text file.

Acknowledgement:
The code is based on the original code by Utkarsh Upadhyay:
https://github.com/musically-ut/matlab-stanford-postagger
It has been modified to work for an input text document. The tool has been tested on short documents only.

POS Tagger Source Code:
Standford POS tagger source files are installed from http://nlp.stanford.edu/software/tagger.shtml

Usage:
1. Command line:
pos_tagging_script
2. Input (untagged) document details :
file_path = 'C:\temp';
file_name = 'untagged_doc.txt';
3. Output (tagged) document details :
file_path = 'C:\temp';
file_name = 'tagged_doc.txt';

Comments and Ratings (3)

J@Y B

J@Y B (view profile)

Does anyone have solved the issue specified by me?

J@Y B

J@Y B (view profile)

Same problem as John Athanasiou

Hello, I'm facing a problem executing the code. I tried to run it, having already changed the paths and the file names and I get this error message:
?? Error: File: pos_tagging_script.m Line: 4 Column: 8
Arguments to IMPORT must either end with ".*"
or else specify a fully qualified class name: "stanford.nlp.tagger.maxent.MaxentTagger" fails this test.

I appended the .* at the end of the 2nd import to see whether it fails again, and got the following error message:

??? Undefined function or method 'MaxentTagger' for input arguments of type 'char'.

Error in ==> pos_tagging_script at 9
tagger = MaxentTagger('./english-left3words-distsim.tagger');

Hello, I'm facing a problem executing the code. I tried to run it, having already changed the paths and the file names and I get this error message:
?? Error: File: pos_tagging_script.m Line: 4 Column: 8
Arguments to IMPORT must either end with ".*"
or else specify a fully qualified class name: "stanford.nlp.tagger.maxent.MaxentTagger" fails this test.

I appended the .* at the end of the 2nd import to see whether it fails again, and got the following error message:

??? Undefined function or method 'MaxentTagger' for input arguments of type 'char'.

Error in ==> pos_tagging_script at 9
tagger = MaxentTagger('./english-left3words-distsim.tagger');

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video