自学编程哪些网课值得推荐?
网站其实没什么用处的
编程还是多动手,多实战
这样你的水平才能够提高
关于如何提高你的水平,你可以去github上面找一些好的demo来练练手
最好的网站肯定是GitHub
照着抄几个高水平的项目
你实力自然会提升很多
技术是专研出来的
我从00年技术做到现在,逆向,渗透,开发都研究的很深,感兴趣可以跟我来学
参考下图找我交流
import java.io.IOException;
import java.util.*;
public class EmotionJudge {
private double priorPositive;//积极先验概率
private double priorNegative;//消极先验概率
private double priorUnsure;//不确定先验概率
private Map<String,Double> backPositive;//词语的后验概率
private Map<String,Double> backNegative;//同上
private Map<String,Double> backUnsure;//同上
private boolean isGroup = false;
private String strTemp;
private Map<String,Integer> articleWordMap;
//这两个是词典的位置
private final String posiDictPath = "/home/geekgao/朴素贝叶斯/台湾大学情感词典/ntusd-positive.txt";
private final String negaDictPath = "/home/geekgao/朴素贝叶斯/台湾大学情感词典/ntusd-negative.txt";
//这两个存储词典中的词语
private Set<String> positiveDict;
private Set<String> negativeDict;
public static void main(String [] args) {
new EmotionJudge().launch();
}
public void launch() {
getPrior();
getBack();
positiveDict = new HashSet<String>();
negativeDict = new HashSet<String>();
readEmotionWord(positiveDict, posiDictPath);
readEmotionWord(negativeDict, negaDictPath);
calc();
}
//获得先验概率
public void getPrior() {
SAXReader sax = new SAXReader();
try {
//从这读取doc的值
Document document = sax.read(new File("/home/geekgao/doc.xml"));
Element root = document.getRootElement();
List<Element> prior = root.elements();
priorPositive = Double.valueOf(prior.get(0).attributeValue("pPositive"));
priorNegative = Double.valueOf(prior.get(0).attributeValue("pNegative"));
priorUnsure = Double.valueOf(prior.get(0).attributeValue("pUnsure"));
} catch (DocumentException e) {
e.printStackTrace();
}
}
//获得后验概率
public void getBack() {
SAXReader sax = new SAXReader();
try {
//从这读取weight的值
Document document = sax.read(new File("/home/geekgao/weight.xml"));
Element root = document.getRootElement();
List<Element> back = root.elements();
backNegative = new HashMap<String, Double>();
backPositive = new HashMap<String, Double>();
backUnsure = new HashMap<String, Double>();
double backPos;//积极后验概率
double backNeg;//消极后验概率
double backUns;//不确定后验概率
String word;