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

      荊州各鄉(xiāng)鎮(zhèn)趕集時(shí)間?

      時(shí)間:2024-11-24 03:49 人氣:0 編輯:招聘街

      一、荊州各鄉(xiāng)鎮(zhèn)趕集時(shí)間?

      荊州各鄉(xiāng)鎮(zhèn)的趕集時(shí)間一般都是每個(gè)月的一號(hào)或者是十五號(hào)。

      二、荊州鄉(xiāng)鎮(zhèn)農(nóng)村土地收費(fèi)標(biāo)準(zhǔn)?

      湖北省荊州市土地共分為四類:

      一類區(qū)片區(qū)片范圍:立新村同心村;關(guān)沮鎮(zhèn)合心村、白水村、清河村、西湖漁場(chǎng)。

      補(bǔ)償標(biāo)準(zhǔn):耕地:40000元/畝;菜地:44000元/畝;果園:44000元/畝;茶園:44000元/畝;精養(yǎng)魚池:44000元/畝;林地:32000元/畝;未利用地:24000元/畝。

      二類區(qū)片區(qū)片范圍:關(guān)沮鎮(zhèn)岳橋村、關(guān)沮村、鳳凰村、江河村、荊州漁場(chǎng)、田湖漁場(chǎng);聯(lián)合鄉(xiāng)軍劉臺(tái)村、天榮畜牧、聯(lián)合漁場(chǎng);鑼場(chǎng)鎮(zhèn)向湖村、青年隊(duì)村。

      補(bǔ)償標(biāo)準(zhǔn):耕地:38000元/畝;菜地:41800元/畝;果園:41800元/畝;茶園:41800元/畝;精養(yǎng)魚池:41800元/畝;林地:30400元/畝;未利用地:22800元/畝。

      三類區(qū)片區(qū)片范圍:聯(lián)合鄉(xiāng)宿駕村、新華村、常灣村、竺橋村、園藝場(chǎng);沙市農(nóng)場(chǎng)窯灣分場(chǎng);岑河鎮(zhèn)麻林村、谷湖村、白瀆村、張場(chǎng)村、童河村、東湖村、西湖村、黃家郖村、洪山村、三岔村、木垸村、王淵村、杉木村、劉園村、定向村、東市村、沙口村、農(nóng)興村、黃場(chǎng)村、窯灣村、奮強(qiáng)湖漁場(chǎng)、原種養(yǎng)殖場(chǎng)、豉湖漁場(chǎng)、園林場(chǎng)、畜牧場(chǎng)、實(shí)驗(yàn)林場(chǎng)、廣谷垸漁場(chǎng);湖北省畜牧良種場(chǎng);岑河農(nóng)場(chǎng)全境。

      補(bǔ)償標(biāo)準(zhǔn):耕地:36000元/畝;菜地:39600元/畝;果園:39600元/畝;茶園:39600元/畝;精養(yǎng)魚池:39600元/畝;林地:28800元/畝;未利用地:21600元/畝。

      四類區(qū)片區(qū)片范圍:沙市農(nóng)場(chǎng)楊場(chǎng)分場(chǎng)、王橋分場(chǎng)、北港分場(chǎng)、菜科院、農(nóng)科院原種場(chǎng)、向陽(yáng)分場(chǎng);岑河鎮(zhèn)岑河村、岑河林場(chǎng)、黃淵村、黃港村、桂花村、廟興村、陳龍村;鑼場(chǎng)鎮(zhèn)鑼場(chǎng)村、長(zhǎng)湖村、白水村、河垱村、漁湖村、花臺(tái)村、高陽(yáng)村;觀音垱鎮(zhèn)全境。

      補(bǔ)償標(biāo)準(zhǔn):耕地:35000元/畝;菜地:38500元/畝;果園:38500元/畝;茶園:38500元/畝;精養(yǎng)魚池:38500元/畝;林地:28000元/畝;未利用地:21000元/畝。

      三、2019湖北定向鄉(xiāng)鎮(zhèn)公務(wù)員面試題目?

      2019湖北定向鄉(xiāng)鎮(zhèn)公務(wù)員面試的題目

      第一題組織管理題目,按照目的意義+準(zhǔn)備組織+控制協(xié)調(diào)+總結(jié)提升,主要從調(diào)研對(duì)象、方式、范圍、內(nèi)容幾方面充實(shí)內(nèi)容,要說(shuō)出自己看法的針對(duì)性和有效性。

      第二題應(yīng)急應(yīng)變,開(kāi)頭可以我作為XX人員,雖然有些慌亂,但應(yīng)該迅速鎮(zhèn)靜下來(lái),履行自己的職責(zé)之內(nèi)開(kāi)頭。。。

      然后按照分析情況、確定任務(wù)、解決問(wèn)題、總結(jié)提高來(lái)充實(shí)內(nèi)容,重點(diǎn)是解決問(wèn)題,要組織人員進(jìn)行救援,協(xié)調(diào)有關(guān)部門如急救、質(zhì)檢等。

      四、廣東省考面試題分鄉(xiāng)鎮(zhèn)和縣級(jí)嗎?

      廣東省考面試的具體考試科目和形式可能因年份和職位而異,因此無(wú)法確定是否會(huì)分鄉(xiāng)鎮(zhèn)和縣級(jí)。一般來(lái)說(shuō),廣東省考面試的考試科目包括綜合素質(zhì)面試和專業(yè)面試,而綜合素質(zhì)面試通常是針對(duì)應(yīng)聘者的綜合素質(zhì)、能力和潛力進(jìn)行考察,而不是針對(duì)具體的行政區(qū)劃進(jìn)行考察。如果您需要更具體的信息,建議您查閱廣東省考的官方網(wǎng)站或相關(guān)招聘公告。

      五、鄉(xiāng)鎮(zhèn)社工結(jié)構(gòu)化面試題型及答題思路?

      鄉(xiāng)鎮(zhèn)社工結(jié)構(gòu)化面試通常會(huì)涉及以下幾個(gè)方面的問(wèn)題,下面提供了一些常見(jiàn)題型和答題思路:

      1. 介紹自我:

      這是一個(gè)開(kāi)放性的問(wèn)題,可以用來(lái)展示你的經(jīng)驗(yàn)、背景和動(dòng)機(jī),以及為什么想成為一名鄉(xiāng)鎮(zhèn)社工。在回答時(shí),可以簡(jiǎn)要概括自己的教育背景、相關(guān)工作經(jīng)驗(yàn),并強(qiáng)調(diào)對(duì)社區(qū)服務(wù)和社會(huì)發(fā)展的熱情。

      2. 場(chǎng)景模擬/案例分析:

      此類問(wèn)題旨在測(cè)試申請(qǐng)人解決問(wèn)題和承受壓力的能力。例如,“如果您碰到一個(gè)困難的家庭,他們面臨著家庭暴力和財(cái)務(wù)問(wèn)題,您將如何處理?” 在回答這類問(wèn)題時(shí),可以使用STAR法則:首先描述具體情境,然后講述采取的行動(dòng)措施,接著談?wù)摻Y(jié)果以及從中學(xué)到的教訓(xùn)。

      3. 道德倫理問(wèn)題:

      這些問(wèn)題測(cè)試申請(qǐng)人的道德判斷和職業(yè)操守。例如,“如果您發(fā)現(xiàn)存在一個(gè)利益沖突,您應(yīng)該如何處理?” 在答題時(shí),要強(qiáng)調(diào)遵循專業(yè)道德規(guī)范并尊重每個(gè)個(gè)體的權(quán)益。可以提到傾聽(tīng)、保密和尊重等原則,并強(qiáng)調(diào)在處理糾紛時(shí)尋求合理解決方案。

      4. 團(tuán)隊(duì)合作與溝通能力:

      這類問(wèn)題旨在了解申請(qǐng)人的團(tuán)隊(duì)意識(shí)和溝通技巧。例如,“請(qǐng)分享一個(gè)您在團(tuán)隊(duì)中取得成功的經(jīng)歷。” 在回答時(shí),可以講述一個(gè)具體的團(tuán)隊(duì)項(xiàng)目或活動(dòng),說(shuō)明自己與團(tuán)隊(duì)成員之間的積極互動(dòng)和有效協(xié)作,以及如何克服挑戰(zhàn)并實(shí)現(xiàn)共同目標(biāo)。

      5. 自我反思與發(fā)展:

      此類問(wèn)題旨在了解申請(qǐng)人對(duì)個(gè)人能力和職業(yè)發(fā)展的認(rèn)識(shí)。例如,“談一談您過(guò)去的工作經(jīng)驗(yàn)對(duì)您個(gè)人和專業(yè)發(fā)展的影響。” 在回答時(shí),可以提及過(guò)去的經(jīng)驗(yàn)對(duì)個(gè)人技能和知識(shí)的增長(zhǎng),并表達(dá)對(duì)未來(lái)學(xué)習(xí)和進(jìn)步的愿望。

      最重要的是要進(jìn)行充分的準(zhǔn)備,在面試前對(duì)于以上題型進(jìn)行深入思考,并結(jié)合自己的經(jīng)驗(yàn)和背景制定有針對(duì)性的答案。另外,在回答問(wèn)題時(shí)要注重表達(dá)清晰、條理清楚,并舉例說(shuō)明。而且也不要忘記展示你的熱情、關(guān)懷和適應(yīng)能力,這對(duì)鄉(xiāng)鎮(zhèn)社工職位非常重要。最后,保持自信和積極的態(tài)度,并與面試官建立良好的溝通與互動(dòng)。

      六、鄉(xiāng)鎮(zhèn)衛(wèi)生院事業(yè)編制面試題答案?

      明確結(jié)論:無(wú)法回答該問(wèn)題,因?yàn)猷l(xiāng)鎮(zhèn)衛(wèi)生院事業(yè)編制面試題的答案不是唯一的,每個(gè)題目的答案還要具體參考題目?jī)?nèi)容及面試官的要求。解釋原因:面試題目的答案是根據(jù)具體情況而定的,有些題目是需要依據(jù)法律法規(guī)、政策等相關(guān)文件進(jìn)行回答的,有些題目則需要結(jié)合自身經(jīng)驗(yàn)、素質(zhì)等進(jìn)行回答。因此無(wú)法給出固定的答案。內(nèi)容延伸:但是,作為一個(gè)鄉(xiāng)鎮(zhèn)衛(wèi)生院事業(yè)編制的面試考生,應(yīng)該具備相關(guān)的知識(shí)和技能,對(duì)于可能出現(xiàn)的問(wèn)題,應(yīng)該提前準(zhǔn)備并思考如何回答。同時(shí)在面試中,要注重表現(xiàn)出自己的素質(zhì)和能力,如溝通能力、領(lǐng)導(dǎo)能力、創(chuàng)新精神等,以增加自己的競(jìng)爭(zhēng)力。

      七、荊州市福渝觀瀾國(guó)際屬于什么鄉(xiāng)鎮(zhèn)?

      不存在鄉(xiāng)鎮(zhèn),歸劃在哪個(gè)區(qū)就算哪里,你可以去看看地圖

      八、事業(yè)單位鄉(xiāng)鎮(zhèn)會(huì)計(jì)專業(yè)面試題常見(jiàn)的題有哪些?

      1、事業(yè)單位統(tǒng)考內(nèi)容都是《基本素質(zhì)測(cè)驗(yàn)》《綜合應(yīng)用能力》。

      2、您報(bào)考崗位是要求會(huì)計(jì)崗位。

      3、如果是事業(yè)單位財(cái)務(wù)崗位的招聘考試,那么會(huì)考事業(yè)單位會(huì)計(jì)準(zhǔn)則、制度相關(guān)的內(nèi)容。

      九、荊州市海潤(rùn)?quán)l(xiāng)鎮(zhèn)供水有限公司官網(wǎng)?

      www.lysksw.com

      1、用戶可以通過(guò)熱線電話、網(wǎng)絡(luò)平臺(tái)兩種方式進(jìn)行水費(fèi)查詢,(水費(fèi)查詢)請(qǐng)?zhí)峁┙毁M(fèi)編碼、用戶姓名及地址進(jìn)行查詢。

      2、水費(fèi)查詢網(wǎng)址為:www.lysksw.com,也可以通過(guò)建行網(wǎng)上銀行自助查詢并交納水費(fèi)。

      十、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

      檢測(cè)數(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。將要檢測(cè)數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

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

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

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

      在hdfs主要?jiǎng)?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。將要檢測(cè)數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

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

      這三步,代碼我就一次全貼出來(lái);主要是兩個(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";

      /*

      * 測(cè)試代碼

      */

      public static void main(String[] args) {

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

      makeTrainVector();

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

      makeModel(false);

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

      BayesCheckData.printResult();

      }

      public static void makeCheckVector(){

      //將測(cè)試數(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(){

      //將測(cè)試數(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("檢測(cè)數(shù)據(jù)構(gòu)造成vectors初始化時(shí)報(bào)錯(cuò)。。。。");

      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);

      }

      // 利用貝葉斯算法開(kāi)始分類,并提取得分最好的分類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("檢測(cè)所屬類別是:"+getCheckResult());

      }

      }

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

      Copyright © 2024 招聘街 滇ICP備2024020316號(hào)-38

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

        东港市| 乃东县| 麻栗坡县| 怀远县| 阳江市| 泗水县| 璧山县| 博客| 内黄县| 房山区| 拉孜县| 杂多县| 松溪县| 腾冲县| 霍城县| 丽水市| 洛阳市| 凤阳县| 根河市| 亚东县| 绥滨县| 永胜县| 项城市| 盐源县| 和林格尔县| 馆陶县| 海城市| 怀化市| 平昌县| 手游| 金川县| 三明市| 霍邱县| 阜城县| 桐梓县| 德州市| 天津市| 南靖县| 会泽县| 拜城县| 库尔勒市|