This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // JNIを使うので以下をインクルードする | |
| #include "platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" | |
| // 例:Resourcesフォルダ内にあるpiyo.binを展開する場合。 | |
| // apkファイルの中にあるファイル名(apk以下相対パス)、Resourcesの中身はassetsに入っている。 | |
| string fromZipFileName = "assets/piyo.bin"; | |
| // 展開ファイルデータサイズ | |
| unsigned long size = 0; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 各プラットフォームごとのファイルを書き込みできるパスを取得する | |
| string path = CCFileUtils::sharedFileUtils()->getWritablePath(); | |
| string fileName = path + "hoge.bin"; | |
| FILE* fp = fopen(fileName.c_str(), "rb"); | |
| // 読み込み用変数 | |
| int data; | |
| fread(&data, sizeof(int), 1, fp); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // 各プラットフォームごとのファイルを書き込みできるパスを取得する | |
| string path = CCFileUtils::sharedFileUtils()->getWritablePath(); | |
| string fileName = path + "hoge.bin"; | |
| FILE* fp = fopen(fileName.c_str(), "wb"); | |
| // 書きこみデータ(※適宜保存する値を入れる) | |
| int data = 1234; | |
| fwrite(&data, sizeof(int), 1, fp); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Sub execute() | |
| Dim nmc_tagger As New NmcTagger | |
| Dim nmc_node As NmcNodeCollection | |
| Dim nmc_param As New NmcParam | |
| Dim FSO As Object | |
| Dim buf As String, n As Long | |
| Dim path As String | |
| Dim file_extension_name As String | |
| Dim dict As Object | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' 関数名 : GetHTMLText | |
| ' 機能 : 指定のurlのhtmlからbody内のテキストを抽出する | |
| ' 引数 : url = webのアドレス。html,htmを想定 | |
| ' 戻り値 : html内テキスト<String Array> | |
| '-------------------------------------------------------------------- | |
| Function GetHTMLText(url As String) As String() | |
| Dim operation_html As MSHTML.HTMLDocument | |
| Dim result_html As MSHTML.HTMLDocument | |
| Dim i As Integer | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' 関数名 : GetPDFText | |
| ' 機能 : 指定のpathのpdfファイル(一太郎)からテキストを抽出する | |
| ' 引数 : path = ファイル絶対パス | |
| ' 戻り値 : ファイル内テキスト<String Array> | |
| '-------------------------------------------------------------------- | |
| Function GetPDFText(path As String) As String() | |
| Dim acro_app As New Acrobat.AcroApp | |
| Dim acro_avdoc As New Acrobat.AcroAVDoc | |
| Dim acro_pddoc As Acrobat.AcroPDDoc | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' 関数名 : GetJTDText | |
| ' 機能 : 指定のpathのjtdファイル(一太郎)からテキストを抽出する | |
| ' 引数 : path = ファイル絶対パス | |
| ' 戻り値 : ファイル内テキスト<String Array> | |
| '-------------------------------------------------------------------- | |
| Function GetJTDText(path As String) As String() | |
| Dim jtd_app As Object | |
| Dim jtd_doc As Object | |
| Dim jtd_lib As Object | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' 関数名 : GetWordText | |
| ' 機能 : 指定のpathのdoc,docxファイル(Word)からテキストを抽出する | |
| ' 引数 : path = ファイル絶対パス | |
| ' 戻り値 : ファイル内テキスト<String Array> | |
| '-------------------------------------------------------------------- | |
| Function GetWordText(path As String) As String() | |
| Dim word_app As Word.Application | |
| Dim word_doc As Word.document | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' 関数名 : GetText | |
| ' 機能 : 指定のpathのtxtファイルからテキストを抽出する | |
| ' 引数 : path = ファイル絶対パス | |
| ' 戻り値 : ファイル内テキスト<String Array> | |
| '-------------------------------------------------------------------- | |
| Function GetText(path As String) As String() | |
| Dim buf As String | |
| Dim res() As String | |
| Dim i As Integer | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | '-------------------------------------------------------------------- | |
| ' テスト用実行関数② | |
| '-------------------------------------------------------------------- | |
| Sub Test2() | |
| Dim nmc_tagger As New NmcTagger | |
| Dim nmc_node As NmcNodeCollection | |
| Dim nmc_param As New NmcParam | |
| Dim buf As String, n As Long | |
| Dim path As String | 
NewerOlder