小编Hit*_*ria的帖子

如何在Java中使用Weka将文本转换为TF-IDF格式?

假设我有以下带有两个属性的示例ARFF文件:

(1)情绪:正面[1]或负面[-1]

(2)推文:文字

@relation sentiment_analysis

@attribute sentiment {1, -1}
@attribute tweet string

@data
-1,'is upset that he can\'t update his Facebook by texting it... and might cry as a result  School today also. Blah!'
-1,'@Kenichan I dived many times for the ball. Managed to save 50\%  The rest go out of bounds'
-1,'my whole body feels itchy and like its on fire '
-1,'@nationwideclass no, it\'s not behaving at all. i\'m mad. why am i here? because I can\'t see …
Run Code Online (Sandbox Code Playgroud)

machine-learning weka arff sentiment-analysis text-classification

5
推荐指数
1
解决办法
2126
查看次数

这是代码中的一种僵局吗?

当然,第二个循环永远不会被执行,但仍然很想知道以下示例是否可以归类为死锁.

public class Test {
    public static void main(String[] args) throws InterruptedException {
        for (int i = 1; i <= 10; i++)
            System.out.print(i + " ");

        Thread.currentThread().join();

        for (int i = 11; i <= 20; i++)
            System.out.print(i + " ");

    }
}
Run Code Online (Sandbox Code Playgroud)

java multithreading synchronization operating-system deadlock

0
推荐指数
1
解决办法
43
查看次数