remove some log info
This commit is contained in:
parent
187a25fe4d
commit
c9bb6af417
|
|
@ -31,7 +31,7 @@ public class GetSynonymsProcess {
|
|||
//创建进程池,一次20个进程
|
||||
private ExecutorService pool = Executors.newFixedThreadPool(20);
|
||||
|
||||
private static String gatherProjectsTableName ="gather_projects_test";//TableName.gatherProjectsTableName;
|
||||
private static String gatherProjectsTableName =TableName.gatherProjectsTableName;
|
||||
private static String synonymsTableName = TableName.synonymsTableName;
|
||||
private static String pointerTableName = TableName.pointerTableName;
|
||||
private static int batchSize = 10000;
|
||||
|
|
@ -40,7 +40,6 @@ public class GetSynonymsProcess {
|
|||
{
|
||||
int lastId = gatherDao.selectLastId(gatherProjectsTableName);
|
||||
int maxId = gatherDao.getMaxId(gatherProjectsTableName);
|
||||
System.out.println("lastId:" + lastId + ",maxId:" + maxId);
|
||||
Thread.sleep(1000);
|
||||
|
||||
int begin = lastId;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class GetSynonymsThread implements Runnable {
|
|||
@Resource
|
||||
private PlatformProjectDao paltformDao;
|
||||
|
||||
private static String gatherProjectsTableName ="gather_031922";//TableName.gatherProjectsTableName;
|
||||
private static String gatherProjectsTableName =TableName.gatherProjectsTableName;
|
||||
private static String synonymsTableName = TableName.synonymsTableName;
|
||||
private static String pointerTableName = TableName.pointerTableName;
|
||||
private static int batchSize = 1000;
|
||||
|
|
@ -76,17 +76,15 @@ public class GetSynonymsThread implements Runnable {
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
System.out.println("beginId:" + this.ids_begin + ",endId:" + this.ids_end);
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.info("进程:" + sourceTable + ":" + this.ids_begin + "to:" + this.ids_end + "开始运行!");
|
||||
|
||||
while(ids_begin < ids_end)
|
||||
{System.out.println("*************************************************************");
|
||||
{
|
||||
beginId = ids_begin;
|
||||
endId = beginId + idIncrement -1;
|
||||
|
||||
|
|
@ -393,7 +391,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
String subName = getSubName(prjName);
|
||||
if(subName != null)
|
||||
{
|
||||
System.out.println("从名字中提取到:" + subName);
|
||||
SynonymMap.put(subName, 1);
|
||||
}
|
||||
|
||||
|
|
@ -492,7 +489,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
getSynonymsFromName(synonymsList,linkNameList,keywords);
|
||||
}catch(Exception e)
|
||||
{
|
||||
System.out.println("1" + e);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -501,7 +497,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
getSynonymsFromDescOfNotGitprj(model,description,prjName,synonymsList,linkNameList,keywords);
|
||||
}catch(Exception e)
|
||||
{
|
||||
System.out.println("2"+ model.getId());
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -512,7 +507,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
result = removeDupStr(linkNameList);
|
||||
}catch(Exception e)
|
||||
{
|
||||
System.out.println("3");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
|
@ -521,7 +515,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
getSynonymsByFullOrShort(result,synonymsList);
|
||||
}catch(Exception e)
|
||||
{
|
||||
System.out.println("4");
|
||||
System.exit(0);
|
||||
}
|
||||
//TODO 将从linkName中依据相似度提取别名的程序独立出来
|
||||
|
|
@ -628,7 +621,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
List<String> beWords = FileReader.read("./files/beVerb.txt");//读取be动词表
|
||||
//TODO 将对description的分词处理部分独立出来
|
||||
description = StringHandler.getFirstSentence(description);
|
||||
System.out.println("get first sentnce");
|
||||
for(String beWord:beWords){
|
||||
|
||||
String linkName = StringHandler.findLinkName(description, beWord);//按系动词表优先级进行匹配
|
||||
|
|
@ -640,11 +632,8 @@ public class GetSynonymsThread implements Runnable {
|
|||
//特征短语去噪
|
||||
List<String> linkNameResult =getLinkNameResult(linkName);
|
||||
|
||||
System.out.println("error :while beword:" + beWord);
|
||||
handleLinkNameResult(model,linkNameResult,synonymsList,linkNameList,keywords);
|
||||
System.out.println("it seems to be ok");
|
||||
}
|
||||
System.out.println("over");
|
||||
|
||||
}
|
||||
public Map<String, Integer> getSynonymsFromDescOfGitprj(String description,String prjName)
|
||||
|
|
@ -697,12 +686,11 @@ public class GetSynonymsThread implements Runnable {
|
|||
|
||||
for(String name:linkNameResult)
|
||||
{
|
||||
logger.info("be 动词之前的有: "+name);
|
||||
if(!keywords.contains(name.toLowerCase().trim()) && !name.toLowerCase().trim().equals(subName.toLowerCase().trim()) )
|
||||
{
|
||||
if(DeleteSpecial(name).equals(strDelete) && DeleteSpecial(name)!= null)
|
||||
{
|
||||
System.out.println("1位置提取到别名:" + name);
|
||||
|
||||
synonymsList.add(name);
|
||||
}
|
||||
else
|
||||
|
|
@ -712,7 +700,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
|
||||
if(synonymsFromGitPrj != null)
|
||||
{
|
||||
System.out.println("2位置提取到:" + synonymsFromGitPrj);
|
||||
synonymsList.add(synonymsFromGitPrj);
|
||||
}
|
||||
else
|
||||
|
|
@ -759,21 +746,18 @@ public class GetSynonymsThread implements Runnable {
|
|||
//be动词前不包括项目类型,且和项目名不相同
|
||||
if(!keywords.contains(name.toLowerCase().trim()) && !name.toLowerCase().trim().equals(model.getName().toLowerCase().trim())
|
||||
&& !name.toLowerCase().trim().equals(projectNameWithoutComName.toLowerCase().trim())){
|
||||
System.out.println("FUCK1");
|
||||
//这里的prjName是完整的name
|
||||
if(model.getName().toLowerCase().indexOf(name.toLowerCase()) != -1){
|
||||
System.out.println("FUCK2");
|
||||
|
||||
String withoutShortDash = RemoveShortDash(name);
|
||||
System.out.println("FUCK2_2");
|
||||
|
||||
if(bracket!=null && !bracket.equals(""))
|
||||
if(name.toLowerCase().equals(bracket.toLowerCase()) || name.toLowerCase().equals(withoutShortDash))
|
||||
{
|
||||
System.out.println("FUCK_2_1");
|
||||
synonymsList.add(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("FUCK2_3");
|
||||
int nameLength1 = withoutShortDash.split(" ").length;
|
||||
int nameLength2 = projectNameWithoutBracket.split(" ").length;
|
||||
int nameLength = name.trim().split(" ").length;
|
||||
|
|
@ -787,7 +771,6 @@ public class GetSynonymsThread implements Runnable {
|
|||
synonymsList.add(name);
|
||||
else linkNameList.add(name);
|
||||
}
|
||||
System.out.println("FUCK3");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue