词性标注修改

master
yz 2 years ago
parent ff834b3310
commit bfc754255c

@ -3,13 +3,16 @@ spring:
data:
mongodb:
database: makesoft
# host: 39.108.144.227
host: 118.31.7.2
# host: 39.108.144.227
# port: 1471
host: 120.78.220.29
port: 27017
# username: makesoft
username: root
# password: makesoft
password: root
username: makesoft
password: makesoft
# host: 118.31.7.2
# port: 27017
# username: root
# password: root
#elasticsearch:
#rest:
#uris: http://39.108.144.227:9200
@ -20,12 +23,15 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://120.78.220.29:3306/makesoft?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Biemo123
# url: jdbc:mysql://39.108.144.227:1637/makesoft?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Biemo123
url: jdbc:mysql://118.31.7.2:3306/makesoft?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: sztzjy2017
# url: jdbc:mysql://118.31.7.2:3306/makesoft?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: sztzjy2017
# 从库数据源
slave:
# 从数据源开关/默认关闭
@ -40,13 +46,13 @@ spring:
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
maxWait: 120000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
timeBetweenEvictionRunsMillis: 120000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
minEvictableIdleTimeMillis: 600000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
maxEvictableIdleTimeMillis: 1800000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
@ -75,13 +81,16 @@ spring:
elasticsearch:
schema: http
# address: 39.108.144.227:9200
address: 118.31.7.2:9200
connectTimeout: 5000
socketTimeout: 5000
connectionRequestTimeout: 5000
address: 120.78.220.29:9200
# address: 39.108.144.227:3135
# address: 118.31.7.2:9200
connectTimeout: 10000
socketTimeout: 10000
connectionRequestTimeout: 10000
maxConnectNum: 100
maxConnectPerRoute: 100
# username: elastic
# password: es@test001
sso:
apiUrl: http://test.vsp.cqooc.com/open/api/v2/oauth/token?appId={APPID}&signature={SIGNATURE}&ticket={TICKET}

@ -36,7 +36,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: debug
com.ruoyi: error
org.springframework: warn
# Spring配置
@ -62,15 +62,17 @@ spring:
# redis 配置
redis:
# 地址
# host: 39.108.144.227
host: localhost
host: 39.108.144.227
# host: 39.108.144.227
# host: localhost
# 端口默认为6379
port: 6379
port: 1135
# port: 6379
# 数据库索引
database: 0
# 密码
# password: 123456
password: ''
password: 123@Biemo.com
# password: ''
# 连接超时时间
timeout: 10s
lettuce:

@ -34,11 +34,11 @@ public class ElasticsearchMonitorProperties {
@Value("${elasticsearch.maxConnectPerRoute}")
private int maxConnectPerRoute;
@Value("${elasticsearch.username}")
private String userName;
@Value("${elasticsearch.password}")
private String password;
// @Value("${elasticsearch.username}")
// private String userName;
//
// @Value("${elasticsearch.password}")
// private String password;
public ElasticsearchMonitorProperties() {
@ -52,21 +52,21 @@ public class ElasticsearchMonitorProperties {
this.schema = schema;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
// public String getUserName() {
// return userName;
// }
//
// public void setUserName(String userName) {
// this.userName = userName;
// }
//
// public String getPassword() {
// return password;
// }
//
// public void setPassword(String password) {
// this.password = password;
// }
public String getAddress() {
return address;

@ -50,7 +50,7 @@ public class ElasticsearchClientPoolFactory implements PooledObjectFactory<RestH
public PooledObject<RestHighLevelClient> makeObject() {
RestHighLevelClient restHighLevelClient = null;
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(esProperties.getUserName(), esProperties.getPassword()));
// credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(esProperties.getUserName(), esProperties.getPassword()));
try {
String[] urlArr = esProperties.getAddress().split(",");
HttpHost[] httpPostArr = new HttpHost[urlArr.length];

@ -16,8 +16,11 @@ import java.util.List;
*
*/
public class SentimentAnalysisUtils {
public static final String CORPUS_FOLDER = TestUtility.ensureTestData("ChnSentiCorp", "http://hanlp.linrunsoft.com/release/corpus/ChnSentiCorp.zip");
public static final String MODEL_PATH = "data/test/sentiment-classification-model.ser";
public static final String CORPUS_FOLDER = TestUtility.ensureTest2Data("ChnSentiCorp", "http://hanlp.linrunsoft.com/release/corpus/ChnSentiCorp.zip");
public static final String MODEL_PATH = "/usr/local/textjar/analysis-hanlp/data/test/sentiment-classification-model.ser";
// public static final String MODEL_PATH = "D:\\tianze\\文本大数据\\analysis-hanlp\\data\\test\\sentiment-classification-model.ser";
public static String analysis(String text){
String result = "";
@ -105,6 +108,9 @@ public class SentimentAnalysisUtils {
}
public static void main(String[] args) {
System.out.println("**********");
System.out.println(MODEL_PATH);
System.out.println("**********");
String[] arr = new String[]{"测试","中性"};
removeSentiments(arr);
}

@ -15,11 +15,12 @@ public class TextClassificationUtils {
/**
* 510005000
*/
public static final String CORPUS_FOLDER = TestUtility.ensureTestData("搜狗文本分类语料库迷你版", "http://hanlp.linrunsoft.com/release/corpus/sogou-text-classification-corpus-mini.zip");
public static final String CORPUS_FOLDER = TestUtility.ensureTest2Data("搜狗文本分类语料库迷你版", "http://hanlp.linrunsoft.com/release/corpus/sogou-text-classification-corpus-mini.zip");
/**
*
*/
public static final String MODEL_PATH = "data/test/classification-model.ser";
public static final String MODEL_PATH = "/usr/local/textjar/analysis-hanlp/data/test/classification-model.ser";
// public static final String MODEL_PATH = "D:\\tianze\\文本大数据\\analysis-hanlp\\data\\test\\classification-model.ser";
//文本分类
public static String getClassification(String text){

@ -13,8 +13,10 @@ import java.io.IOException;
*/
public class WordVectorModelUtils {
private static final String TRAIN_FILE_NAME = TestUtility.ensureTestData("搜狗文本分类语料库已分词.txt", "http://hanlp.linrunsoft.com/release/corpus/sogou-mini-segmented.zip");
private static final String MODEL_FILE_NAME = "data/test/word2vec.txt";
// private static final String TRAIN_FILE_NAME = TestUtility.ensureTestData("搜狗文本分类语料库已分词.txt", "http://hanlp.linrunsoft.com/release/corpus/sogou-mini-segmented.zip");
private static final String TRAIN_FILE_NAME = TestUtility.ensureTestData("搜狗文本分类语料库已分词.txt", "https://develope.lanzoug.com/file/?BGJTbQg5ATAFDFZuADVdMVJtBDwCMQZ8AigHbFF4AXNTOlpuAXEGugPoU6MAslDNVLQOK1/lU/8EigblU4JayARxU2oIPAEjBTZWcgAnXT1SZAQvAjwGdAJuBydRawFpUz9aaAEDBjsDMVM4AGVQYFQ6DjNfNVNkBDMGN1M7Wn0EYlN3CGgBZwVlVjYAZF1lUj8EOQJkBiICdQdxUTABMlNjWj8BbwZ9A2VTMAB7UGBUPw4kX2JTYQRmBmRTOVpsBDNTNwhnATEFYlYwAGddOlI/BGQCZAY2AmAHYFFvAWNTN1o9AW0GNAMzU2cAYVAyVGoOMl8uUzAEcwZrUylaLgR3U2EIJwE8BTdWPQBlXWtSPgQ0Am8GMgI1BydReQFpUz5aaAE6Bm8DZFMzAGxQZ1Q5DjlfOVNoBDYGNVMhWnUEIlNiCDkBIgVuVjEAYl1kUj4ENgJtBjYCNgc0UT0BJlMmWn0BKwZvA2RTMwBsUGJUOQ4yXzFTaQQwBjNTKVouBG1TdAhoAWQFYlYzAHpdblI8BDYCcwY1AjYHN1EjATFTZ1o7");
private static final String MODEL_FILE_NAME = "/usr/local/textjar/analysis-hanlp/data/test/word2vec.txt";
// private static final String MODEL_FILE_NAME = "D:\\tianze\\文本大数据\\analysis-hanlp\\data\\test\\word2vec.txt";
//相似度计算
public static Float similarCount(String text1,String text2) {

Loading…
Cancel
Save