国内精品久久久久_亚洲区手机在线中文无码播放_国内精品久久久久影院一蜜桃_日韩内射激情视频在线播放免费

      蘋果怎么裝箱好看?

      時(shí)間:2024-12-27 08:37 人氣:0 編輯:招聘街

      一、蘋果怎么裝箱好看?

      蘋果的包裝可以通過以下幾種方式來使其看起來更好看:

      首先,選擇一個(gè)精美的包裝盒,可以是透明的塑料盒或者有設(shè)計(jì)感的紙盒,這樣可以突出蘋果的顏色和形狀。

      其次,可以在包裝上添加一些裝飾,比如絲帶、貼紙或者標(biāo)簽,以增加視覺吸引力。

      另外,可以考慮將蘋果放在一個(gè)漂亮的籃子或者盤子里,再用透明的包裝紙進(jìn)行包裹,這樣不僅可以保護(hù)蘋果,還能增加整體的美感。

      最后,可以在包裝上印上品牌標(biāo)志或者個(gè)性化的字樣,以增加品牌的識別度和獨(dú)特性。總之,通過精心設(shè)計(jì)和選擇合適的包裝材料,可以使蘋果包裝更加吸引人,提升產(chǎn)品的價(jià)值和美觀度。

      二、蘋果14裝箱清單?

      iPhone 14的標(biāo)配內(nèi)容:iPhone 14本體一個(gè)、配合轉(zhuǎn)移數(shù)據(jù)和充電使用的USB-C接口數(shù)據(jù)線一根、取卡針一個(gè)、保修卡和說明書一份、蘋果logo貼紙一張。除此之外,沒有任何東西。充電器也是要自己付費(fèi)購買的!

      三、蘋果臺式電腦怎么裝箱?

      蘋果臺式電腦是蘋果一體機(jī),裝箱很簡單,它這個(gè)有泡沫,先把上面的兩個(gè)泡沫卡在機(jī)器的屏幕兩側(cè),然后提起來放在一體機(jī)紙箱的底部也有泡沫,是梯形的放進(jìn)去就行了,最后再放無線鍵盤和鼠標(biāo)封裝

      四、新西蘭進(jìn)口蘋果包裝箱價(jià)格解析

      新西蘭是全球著名的蘋果生產(chǎn)和出口大國。作為優(yōu)質(zhì)水果的代表,新西蘭蘋果以其香甜多汁、口感脆爽而備受推崇,在國內(nèi)外市場都有著廣泛的歡迎程度。然而,很多消費(fèi)者在購買新西蘭蘋果時(shí),往往會對其包裝箱的價(jià)格產(chǎn)生疑惑。今天,我們就來解析一下新西蘭蘋果包裝箱的價(jià)格情況。

      新西蘭蘋果包裝箱種類

      新西蘭蘋果出口時(shí)通常采用以下幾種包裝箱:

      • 單層紙箱:適用于高端精品蘋果,每箱約重18公斤,內(nèi)襯有緩沖材料;
      • 雙層紙箱:適用于普通商品蘋果,每箱約重18公斤,內(nèi)有兩層蘋果;
      • 木箱:適用于批發(fā)和遠(yuǎn)途運(yùn)輸,每箱約重20公斤,結(jié)實(shí)耐用;
      • 塑料箱:適用于本地短途配送,每箱約重18公斤,可循環(huán)使用。

      新西蘭蘋果包裝箱價(jià)格

      新西蘭蘋果包裝箱的價(jià)格主要取決于以下幾個(gè)因素:

      1. 包裝箱種類:單層紙箱價(jià)格最高,木箱和塑料箱價(jià)格較低;
      2. 蘋果品種:如嘎啦蘋果皇家羅斯等知名品種箱價(jià)較高;
      3. 出口國家:遠(yuǎn)距離出口運(yùn)費(fèi)更高,因此箱價(jià)也會上漲;
      4. 訂單數(shù)量:大宗采購可以獲得更優(yōu)惠的價(jià)格。

      根據(jù)行業(yè)數(shù)據(jù),新西蘭蘋果單層紙箱的出廠價(jià)格約為20-30紐元;雙層紙箱約為15-25紐元;木箱約為10-20紐元;塑料箱約為5-15紐元。加上運(yùn)輸、關(guān)稅等成本后,到達(dá)國內(nèi)市場的終端售價(jià)會有所上浮。

      購買新西蘭蘋果包裝箱注意事項(xiàng)

      1. 選擇正規(guī)渠道采購,避免購買假冒偽劣產(chǎn)品;
      2. 關(guān)注產(chǎn)地、品種、等級信息,確保購買到優(yōu)質(zhì)蘋果;
      3. 了解運(yùn)輸條件,保證新鮮程度;
      4. 比較不同供應(yīng)商的價(jià)格和服務(wù),選擇性價(jià)比較高的。

      總的來說,新西蘭蘋果包裝箱的價(jià)格在合理范圍內(nèi),符合其優(yōu)質(zhì)水果的定位。合理把控成本對于經(jīng)銷商和消費(fèi)者來說都很重要。希望以上內(nèi)容能夠幫助大家更好地了解新西蘭蘋果包裝箱的價(jià)格情況。

      感謝您閱讀本文,希望對您有所幫助。如果您還有任何其他疑問,歡迎隨時(shí)咨詢。

      五、蘋果24個(gè)包裝箱尺寸?

      蘋果外包裝尺寸長寬高分別如下:高度:146.7毫米(5.78英寸);寬度:715.毫米(2.82英寸;厚度:7.65毫米(0.30英寸);重量:173克(6.10盎司)。

      六、賣蘋果手機(jī)裝箱視頻怎么拍?

      可以打開蘋果手機(jī)自帶攝像頭,按步驟從包裝盒到防撞物即可

      七、蘋果一體機(jī)怎么裝箱?蘋果一體機(jī)怎么裝箱的?

      蘋果一體機(jī)應(yīng)該按照以下步驟裝箱:

      1. 檢查商品的外觀、功能和型號,確保與客戶提供的要求一致;

      2. 將商品置于紙箱內(nèi),并將護(hù)墊物品(如吸附物、氣墊、塑料片)正確的填充空間;

      3. 將商品放置在正確的位置,在正確的位置固定。確保商品貼合平整;

      4. 將所有商品及附件完整的放置在紙箱內(nèi),如果有贈品也要放置在紙箱內(nèi);

      5. 用補(bǔ)丁將鋁箔膜覆蓋箱內(nèi)的商品,確保商品完整,形成一個(gè)“氣密狀態(tài)”;

      6. 將紙箱的頂部或底部壓實(shí),使紙箱內(nèi)的商品壓實(shí),使紙箱緊湊;

      7. 進(jìn)行封箱操作,并在箱頭上粘貼對應(yīng)的安全標(biāo)識。

      八、集裝箱裝箱方案怎么做?集裝箱裝箱方案軟件那個(gè)好用?

      做外貿(mào)、物流運(yùn)輸行業(yè)的朋友應(yīng)該知道做集裝箱裝箱方案有2種方式:一是通過經(jīng)驗(yàn)豐富的人工進(jìn)行設(shè)計(jì)裝箱方案,二是通過智能裝箱軟件進(jìn)行裝箱方案一鍵生成。集裝箱裝箱方案軟件常見使用比較多的是悠閑裝箱。感興趣的自己可以去搜索看看。

      集裝箱裝箱方案怎么做?

      人工做集裝箱裝箱方案常見流程有那些:

      1、確定貨物基礎(chǔ)尺寸、重量等具體參數(shù)

      2、確定貨物具體碼放要求

      3、確定貨物運(yùn)輸方式、配置、前后重心

      4、根據(jù)要求制作裝箱方案平面圖

      5、根據(jù)制作完成的集裝箱裝箱方案制作加固示意說明圖

      人工制作的裝箱方案

      人工做集裝箱裝箱方案有那些不足:

      1、人工做集裝箱裝箱方案圖需要考慮的方面非常多,往往很多人都是考慮不周全的,無法做到裝箱軟件的全面兼顧,常常會造成返工。

      2、人工制作的集裝箱裝箱方案圖都是以平面裝箱圖為主,當(dāng)貨物數(shù)量過多后,設(shè)計(jì)的裝箱方案無法直觀的展示裝箱方案示意的內(nèi)容、內(nèi)容也不詳細(xì),往往會導(dǎo)致我們裝箱出現(xiàn)偏差。

      3、人工制作的集裝箱裝箱方案沒有做過的小白來說更是難以理解其中的內(nèi)容,無法快速上手工作,同時(shí)會導(dǎo)致我們裝箱效率、人力成本上升。

      集裝箱裝箱方案軟件那個(gè)好用?

      集裝箱裝箱方案軟件目前我個(gè)人使用的是悠閑裝箱(http://www.optimalpacking.cn),個(gè)人覺得操作比較簡單、不復(fù)雜,不像一些軟件操作設(shè)置要求很多,沒有專業(yè)物流知識的很難制作專業(yè)的裝箱方案。或者加客服微信(qinguichaoGG)

      同時(shí)悠閑裝箱軟件也是具備人工制作集裝箱裝箱方案的多方面考慮要求,并且能夠生成3D直觀的視覺指導(dǎo)圖、裝箱方案,新手也能看得懂;還能提升我們集裝箱的裝修率,制作的裝箱方案可以直接提供給中心站審核。

      軟件做的裝箱方案

      軟件做的裝箱方案

      智能裝箱軟件制作裝箱方案的流程:

      step1:單擊圖標(biāo)或“創(chuàng)建裝箱計(jì)劃”按鈕,創(chuàng)建裝箱計(jì)劃

      step2:輸入裝箱計(jì)劃名稱和選擇直接裝箱后單擊下一步

      建議:

      推薦使用集裝箱號或者車牌號作為裝箱計(jì)劃名稱。

      Step3:錄入裝箱貨物數(shù)據(jù)

      建議:

      錄入\導(dǎo)入說明見用前必讀,錄入\導(dǎo)入貨物說明*號為必填項(xiàng)

      Step4:選擇容器后點(diǎn)擊 “生成裝箱方案”按鈕

      建議:

      1、可以從標(biāo)準(zhǔn)容器或和收藏夾里選擇容器。自己常用的容器尺寸,可以點(diǎn)收藏。

      2、點(diǎn)自定義可以修改集裝箱尺寸和限重。

      Step5:查看裝箱指導(dǎo)圖/裝箱方案/3D裝箱動畫

      建議:

      1、“裝箱指導(dǎo)圖”步驟式展示裝箱圖,用于現(xiàn)場裝箱使用。

      2、“裝箱方案”用于鐵路中心站審核方案使用。

      3、“3D裝箱動畫”可以360度拖動查看排柜情況,適合海關(guān)查驗(yàn)找貨使用。

      智能裝箱軟件制作裝箱方案的優(yōu)勢在哪里:

      1、操作簡單,只需要按照操作示意圖要求填寫就可以完成制作集裝箱裝箱方案。

      2、兼顧所有裝箱方案要求,可以選擇多條件、多運(yùn)輸環(huán)境、多要求設(shè)置專屬定制裝箱方案。

      3、5秒生成集裝箱裝箱方案,一鍵快速生成專屬裝箱方案,無需復(fù)雜的人工計(jì)算。

      4、3D直觀視圖,生成3D直觀裝箱方案、裝箱方案動畫,可以直接按步驟裝箱。

      5、使用門檻低,不需要具備專業(yè)物流只是也可以完整制作集裝箱裝箱方案

      6、同時(shí)具備提升集裝箱裝載率,為企業(yè)節(jié)約成本。

      總結(jié):

      總體來說目前人工制作裝箱方案跟軟件相比存在非常大的劣勢的,從制作效率、成本、質(zhì)量、難易程度都非常不盡人意的。如果你正在為制作裝箱方案為難,不妨搜索“悠閑裝箱”一鍵體驗(yàn)下五秒算箱的樂趣。

      九、蘋果一體機(jī)裝箱步驟?

      一種蘋果快速裝箱裝置,包括水槽,位于水槽左上方的進(jìn)水管,設(shè)于水槽底部的排水管,設(shè)于水槽右部的蘋果撥動機(jī)構(gòu),支撐柱,設(shè)于支撐柱上的蘋果輸送架,設(shè)于支撐柱下方的轉(zhuǎn)盤,設(shè)于轉(zhuǎn)盤上的蘋果箱,設(shè)于轉(zhuǎn)盤外側(cè)的吹風(fēng)罩;進(jìn)水管和出水管上均設(shè)有電磁閥,進(jìn)水管上設(shè)有增壓泵,進(jìn)水管上設(shè)有若干個(gè)用于向右下方排水的排水孔,還包括圓形導(dǎo)軌和第一電機(jī),轉(zhuǎn)盤通過若干個(gè)滾珠與導(dǎo)軌滾動連接,轉(zhuǎn)盤下表面上設(shè)有環(huán)形齒條,第一電機(jī)與齒輪連接,齒輪與環(huán)形齒條嚙合;還包括鼓風(fēng)機(jī),鼓風(fēng)機(jī)通過管道與吹氣罩連接;蘋果撥動機(jī)構(gòu)包括第一氣缸,與第一氣缸的伸縮桿連接的第二電機(jī),第二電機(jī)與縱向擋板連接,支撐柱上設(shè)有用于帶動蘋果輸送架升降旋轉(zhuǎn)的動力機(jī)構(gòu),水槽上設(shè)有超聲波發(fā)生器,控制器分別與超聲波發(fā)生器、2個(gè)電磁閥、增壓泵、第一電機(jī)、鼓風(fēng)機(jī)、第一氣缸、第二電機(jī)、動力機(jī)構(gòu)和蘋果輸送架電連接。

      十、mahout面試題?

      之前看了Mahout官方示例 20news 的調(diào)用實(shí)現(xiàn);于是想根據(jù)示例的流程實(shí)現(xiàn)其他例子。網(wǎng)上看到了一個(gè)關(guān)于天氣適不適合打羽毛球的例子。

      訓(xùn)練數(shù)據(jù):

      Day Outlook Temperature Humidity Wind PlayTennis

      D1 Sunny Hot High Weak No

      D2 Sunny Hot High Strong No

      D3 Overcast Hot High Weak Yes

      D4 Rain Mild High Weak Yes

      D5 Rain Cool Normal Weak Yes

      D6 Rain Cool Normal Strong No

      D7 Overcast Cool Normal Strong Yes

      D8 Sunny Mild High Weak No

      D9 Sunny Cool Normal Weak Yes

      D10 Rain Mild Normal Weak Yes

      D11 Sunny Mild Normal Strong Yes

      D12 Overcast Mild High Strong Yes

      D13 Overcast Hot Normal Weak Yes

      D14 Rain Mild High Strong No

      檢測數(shù)據(jù):

      sunny,hot,high,weak

      結(jié)果:

      Yes=》 0.007039

      No=》 0.027418

      于是使用Java代碼調(diào)用Mahout的工具類實(shí)現(xiàn)分類。

      基本思想:

      1. 構(gòu)造分類數(shù)據(jù)。

      2. 使用Mahout工具類進(jìn)行訓(xùn)練,得到訓(xùn)練模型。

      3。將要檢測數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

      4. 分類器對vector數(shù)據(jù)進(jìn)行分類。

      接下來貼下我的代碼實(shí)現(xiàn)=》

      1. 構(gòu)造分類數(shù)據(jù):

      在hdfs主要創(chuàng)建一個(gè)文件夾路徑 /zhoujainfeng/playtennis/input 并將分類文件夾 no 和 yes 的數(shù)據(jù)傳到hdfs上面。

      數(shù)據(jù)文件格式,如D1文件內(nèi)容: Sunny Hot High Weak

      2. 使用Mahout工具類進(jìn)行訓(xùn)練,得到訓(xùn)練模型。

      3。將要檢測數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

      4. 分類器對vector數(shù)據(jù)進(jìn)行分類。

      這三步,代碼我就一次全貼出來;主要是兩個(gè)類 PlayTennis1 和 BayesCheckData = =》

      package myTesting.bayes;

      import org.apache.hadoop.conf.Configuration;

      import org.apache.hadoop.fs.FileSystem;

      import org.apache.hadoop.fs.Path;

      import org.apache.hadoop.util.ToolRunner;

      import org.apache.mahout.classifier.naivebayes.training.TrainNaiveBayesJob;

      import org.apache.mahout.text.SequenceFilesFromDirectory;

      import org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles;

      public class PlayTennis1 {

      private static final String WORK_DIR = "hdfs://192.168.9.72:9000/zhoujianfeng/playtennis";

      /*

      * 測試代碼

      */

      public static void main(String[] args) {

      //將訓(xùn)練數(shù)據(jù)轉(zhuǎn)換成 vector數(shù)據(jù)

      makeTrainVector();

      //產(chǎn)生訓(xùn)練模型

      makeModel(false);

      //測試檢測數(shù)據(jù)

      BayesCheckData.printResult();

      }

      public static void makeCheckVector(){

      //將測試數(shù)據(jù)轉(zhuǎn)換成序列化文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"testinput";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-test-seq";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SequenceFilesFromDirectory sffd = new SequenceFilesFromDirectory();

      String[] params = new String[]{"-i",input,"-o",output,"-ow"};

      ToolRunner.run(sffd, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("文件序列化失敗!");

      System.exit(1);

      }

      //將序列化文件轉(zhuǎn)換成向量文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-test-seq";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-test-vectors";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SparseVectorsFromSequenceFiles svfsf = new SparseVectorsFromSequenceFiles();

      String[] params = new String[]{"-i",input,"-o",output,"-lnorm","-nv","-wt","tfidf"};

      ToolRunner.run(svfsf, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("序列化文件轉(zhuǎn)換成向量失敗!");

      System.out.println(2);

      }

      }

      public static void makeTrainVector(){

      //將測試數(shù)據(jù)轉(zhuǎn)換成序列化文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"input";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-seq";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SequenceFilesFromDirectory sffd = new SequenceFilesFromDirectory();

      String[] params = new String[]{"-i",input,"-o",output,"-ow"};

      ToolRunner.run(sffd, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("文件序列化失敗!");

      System.exit(1);

      }

      //將序列化文件轉(zhuǎn)換成向量文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-seq";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-vectors";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SparseVectorsFromSequenceFiles svfsf = new SparseVectorsFromSequenceFiles();

      String[] params = new String[]{"-i",input,"-o",output,"-lnorm","-nv","-wt","tfidf"};

      ToolRunner.run(svfsf, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("序列化文件轉(zhuǎn)換成向量失敗!");

      System.out.println(2);

      }

      }

      public static void makeModel(boolean completelyNB){

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-vectors"+Path.SEPARATOR+"tfidf-vectors";

      String model = WORK_DIR+Path.SEPARATOR+"model";

      String labelindex = WORK_DIR+Path.SEPARATOR+"labelindex";

      Path in = new Path(input);

      Path out = new Path(model);

      Path label = new Path(labelindex);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      if(fs.exists(label)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(label, true);

      }

      TrainNaiveBayesJob tnbj = new TrainNaiveBayesJob();

      String[] params =null;

      if(completelyNB){

      params = new String[]{"-i",input,"-el","-o",model,"-li",labelindex,"-ow","-c"};

      }else{

      params = new String[]{"-i",input,"-el","-o",model,"-li",labelindex,"-ow"};

      }

      ToolRunner.run(tnbj, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("生成訓(xùn)練模型失敗!");

      System.exit(3);

      }

      }

      }

      package myTesting.bayes;

      import java.io.IOException;

      import java.util.HashMap;

      import java.util.Map;

      import org.apache.commons.lang.StringUtils;

      import org.apache.hadoop.conf.Configuration;

      import org.apache.hadoop.fs.Path;

      import org.apache.hadoop.fs.PathFilter;

      import org.apache.hadoop.io.IntWritable;

      import org.apache.hadoop.io.LongWritable;

      import org.apache.hadoop.io.Text;

      import org.apache.mahout.classifier.naivebayes.BayesUtils;

      import org.apache.mahout.classifier.naivebayes.NaiveBayesModel;

      import org.apache.mahout.classifier.naivebayes.StandardNaiveBayesClassifier;

      import org.apache.mahout.common.Pair;

      import org.apache.mahout.common.iterator.sequencefile.PathType;

      import org.apache.mahout.common.iterator.sequencefile.SequenceFileDirIterable;

      import org.apache.mahout.math.RandomAccessSparseVector;

      import org.apache.mahout.math.Vector;

      import org.apache.mahout.math.Vector.Element;

      import org.apache.mahout.vectorizer.TFIDF;

      import com.google.common.collect.ConcurrentHashMultiset;

      import com.google.common.collect.Multiset;

      public class BayesCheckData {

      private static StandardNaiveBayesClassifier classifier;

      private static Map<String, Integer> dictionary;

      private static Map<Integer, Long> documentFrequency;

      private static Map<Integer, String> labelIndex;

      public void init(Configuration conf){

      try {

      String modelPath = "/zhoujianfeng/playtennis/model";

      String dictionaryPath = "/zhoujianfeng/playtennis/tennis-vectors/dictionary.file-0";

      String documentFrequencyPath = "/zhoujianfeng/playtennis/tennis-vectors/df-count";

      String labelIndexPath = "/zhoujianfeng/playtennis/labelindex";

      dictionary = readDictionnary(conf, new Path(dictionaryPath));

      documentFrequency = readDocumentFrequency(conf, new Path(documentFrequencyPath));

      labelIndex = BayesUtils.readLabelIndex(conf, new Path(labelIndexPath));

      NaiveBayesModel model = NaiveBayesModel.materialize(new Path(modelPath), conf);

      classifier = new StandardNaiveBayesClassifier(model);

      } catch (IOException e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("檢測數(shù)據(jù)構(gòu)造成vectors初始化時(shí)報(bào)錯。。。。");

      System.exit(4);

      }

      }

      /**

      * 加載字典文件,Key: TermValue; Value:TermID

      * @param conf

      * @param dictionnaryDir

      * @return

      */

      private static Map<String, Integer> readDictionnary(Configuration conf, Path dictionnaryDir) {

      Map<String, Integer> dictionnary = new HashMap<String, Integer>();

      PathFilter filter = new PathFilter() {

      @Override

      public boolean accept(Path path) {

      String name = path.getName();

      return name.startsWith("dictionary.file");

      }

      };

      for (Pair<Text, IntWritable> pair : new SequenceFileDirIterable<Text, IntWritable>(dictionnaryDir, PathType.LIST, filter, conf)) {

      dictionnary.put(pair.getFirst().toString(), pair.getSecond().get());

      }

      return dictionnary;

      }

      /**

      * 加載df-count目錄下TermDoc頻率文件,Key: TermID; Value:DocFreq

      * @param conf

      * @param dictionnaryDir

      * @return

      */

      private static Map<Integer, Long> readDocumentFrequency(Configuration conf, Path documentFrequencyDir) {

      Map<Integer, Long> documentFrequency = new HashMap<Integer, Long>();

      PathFilter filter = new PathFilter() {

      @Override

      public boolean accept(Path path) {

      return path.getName().startsWith("part-r");

      }

      };

      for (Pair<IntWritable, LongWritable> pair : new SequenceFileDirIterable<IntWritable, LongWritable>(documentFrequencyDir, PathType.LIST, filter, conf)) {

      documentFrequency.put(pair.getFirst().get(), pair.getSecond().get());

      }

      return documentFrequency;

      }

      public static String getCheckResult(){

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String classify = "NaN";

      BayesCheckData cdv = new BayesCheckData();

      cdv.init(conf);

      System.out.println("init done...............");

      Vector vector = new RandomAccessSparseVector(10000);

      TFIDF tfidf = new TFIDF();

      //sunny,hot,high,weak

      Multiset<String> words = ConcurrentHashMultiset.create();

      words.add("sunny",1);

      words.add("hot",1);

      words.add("high",1);

      words.add("weak",1);

      int documentCount = documentFrequency.get(-1).intValue(); // key=-1時(shí)表示總文檔數(shù)

      for (Multiset.Entry<String> entry : words.entrySet()) {

      String word = entry.getElement();

      int count = entry.getCount();

      Integer wordId = dictionary.get(word); // 需要從dictionary.file-0文件(tf-vector)下得到wordID,

      if (StringUtils.isEmpty(wordId.toString())){

      continue;

      }

      if (documentFrequency.get(wordId) == null){

      continue;

      }

      Long freq = documentFrequency.get(wordId);

      double tfIdfValue = tfidf.calculate(count, freq.intValue(), 1, documentCount);

      vector.setQuick(wordId, tfIdfValue);

      }

      // 利用貝葉斯算法開始分類,并提取得分最好的分類label

      Vector resultVector = classifier.classifyFull(vector);

      double bestScore = -Double.MAX_VALUE;

      int bestCategoryId = -1;

      for(Element element: resultVector.all()) {

      int categoryId = element.index();

      double score = element.get();

      System.out.println("categoryId:"+categoryId+" score:"+score);

      if (score > bestScore) {

      bestScore = score;

      bestCategoryId = categoryId;

      }

      }

      classify = labelIndex.get(bestCategoryId)+"(categoryId="+bestCategoryId+")";

      return classify;

      }

      public static void printResult(){

      System.out.println("檢測所屬類別是:"+getCheckResult());

      }

      }

      相關(guān)資訊
      熱門頻道

      Copyright © 2024 招聘街 滇ICP備2024020316號-38

      国内精品久久久久_亚洲区手机在线中文无码播放_国内精品久久久久影院一蜜桃_日韩内射激情视频在线播放免费

        平舆县| 通州市| 手游| 武冈市| 明溪县| 揭西县| 远安县| 津南区| 宜黄县| 山阳县| 淳安县| 道真| 绍兴县| 朝阳县| 罗定市| 裕民县| 榆社县| 黎川县| 南城县| 白沙| 师宗县| 福海县| 芜湖县| 翁牛特旗| 龙游县| 孝昌县| 宝坻区| 溧水县| 沭阳县| 阳西县| 防城港市| 扶沟县| 庆安县| 将乐县| 康保县| 延庆县| 虹口区| 名山县| 高尔夫| 台州市| 隆德县|