-3
我需要處理大量的簡歷。並且想使用這個解析器: https://github.com/antonydeepak/ResumeParser 但是你在powershell中用讀取的文件和輸出文件運行它。 但我不知道如何自動化,所以它讀取包含簡歷的整個文件夾。如何將參數傳遞給預編譯的java代碼
我知道一些Java,但無法打開代碼。在PowerShell中進行腳本編寫的路要走嗎?
謝謝!
我需要處理大量的簡歷。並且想使用這個解析器: https://github.com/antonydeepak/ResumeParser 但是你在powershell中用讀取的文件和輸出文件運行它。 但我不知道如何自動化,所以它讀取包含簡歷的整個文件夾。如何將參數傳遞給預編譯的java代碼
我知道一些Java,但無法打開代碼。在PowerShell中進行腳本編寫的路要走嗎?
謝謝!
> java -cp '.\bin\*;..\GATEFiles\lib\*;..\GATEFILES\bin\gate.jar;.\lib\*'
code4goal.antony.resumeparser.ResumeParserProgram <input_file> [output_file]
要麼從已編輯的目錄列表中創建批處理文件,要麼編寫程序。 由於這是計算器:
所以用相同的類路徑開始(-cp ......),你可以運行自己的程序
public void static main(String[] args) throws IOException {
File[] files = new File("C:/resumes").listFiles();
File outputDir = new File("C:/results");
outputDir.mkDirs();
if (files != null) {
for (File file : files) {
String path = file.getPath();
if (path.endsWith(".pdf")) {
String output = new File(outputDir,
file.getName().replaceFirst("\\.\\w+$", "") + ".json").getPath();
String[] params = {path, output);
ResumeParserProgram.main(params);
// For creating a batch file >x.bat
System.out.println("java -cp"
+ " '.\\bin\\*;..\\GATEFiles\lib\\*;"
+ "..\\GATEFILES\\bin\\gate.jar;.\\lib\\*'"
+ " code4goal.antony.resumeparser.ResumeParserProgram"
+ " \"" + path + "\" \"" + output + "\"");
}
}
}
}
檢查工作的,即ResumeParserProgram.main是重入的。
當然,您可以更改ResumeParser代碼,或者實現一個小腳本來搜索文件夾結構中的文件,但我不知道最適合您需要的文件。 –