-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPreAnalysis.cpp
More file actions
49 lines (39 loc) · 1.23 KB
/
Copy pathPreAnalysis.cpp
File metadata and controls
49 lines (39 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <dirent.h>
#include <algorithm>
#include <stdlib.h>
#include <vector>
#include <regex> // regular expressions
#include <mecab.h>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
vector<string> split( string s, string c ){
vector<string> ret;
for( int i=0, n; i <= s.length(); i=n+1 ){
n = s.find_first_of( c, i );
if( n == string::npos ) n = s.length();
string tmp = s.substr( i, n-i );
ret.push_back(tmp);
}
return ret;
}
#include "MakeFileList.cpp"
#include "ExtractUseData.cpp"
int main() {
const char* path = "/home/3928941380/Downloads/TV/NHK_toAnalyze/";
/* 「const char *」というデータ型は、書き換えできない(読み取り専用の)文字列に対して */
/* ファイルリストの作成 */
Temp_Path temp_path;
int found_file_num=0;
temp_path = getFileList(path, &found_file_num);
FILE_LIST *File_List = new FILE_LIST[found_file_num]; // Files to Use http://goo.gl/n1tTj4FILENUM_MAX
int put_file_num = 0;
filteredFileList(temp_path, &found_file_num, File_List, &put_file_num); // read specific source of file
/* 使用データの抽出 */
extractData(path, &put_file_num, File_List);
return 0;
}