का प्रदर्शन बढ़ाएं मैंने अभी एक प्रोग्राम लागू किया है जो जावा में स्टैनफोर्ड पीओएस टैगर का उपयोग करता है।स्टैनफोर्ड-टैगर आधारित प्रोग्राम
मैंने कुछ केबी आकार के इनपुट फ़ाइल का उपयोग किया, जिसमें कुछ सौ शब्द शामिल थे। मैंने ढेर आकार को 600 एमबी तक भी सेट किया।
लेकिन यह अभी भी धीमा है और कभी-कभी ढेर स्मृति से बाहर चला जाता है। मैं इसकी निष्पादन गति और मेमोरी प्रदर्शन कैसे बढ़ा सकता हूं? मैं इनपुट के रूप में कुछ एमबी का उपयोग करने में सक्षम होना चाहता हूँ।
public static void postag(String args) throws ClassNotFoundException
{
try
{
File filein=new File("c://input.txt");
String content = FileUtils.readFileToString(filein);
MaxentTagger tagger = new MaxentTagger("postagging/wsj-0-18-bidirectional-distsim.tagger");
String tagged = tagger.tagString(content);
try
{
File file = new File("c://output.txt");
if (!file.exists())
{
file.createNewFile();
}
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write("\n"+tagged);
bw.close();
}
catch (IOException e)
{
e.printStackTrace();
}
} catch (IOException e1)
{
e1.printStackTrace();
}
}
धन्यवाद। Left3words का उपयोग करेंगे :) – Ameer