推荐算法修改
This commit is contained in:
@@ -6,7 +6,6 @@ import com.tarzan.recommend.dto.UserDTO;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.assertj.core.util.Lists;
|
import org.assertj.core.util.Lists;
|
||||||
import org.springframework.util.ResourceUtils;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
@@ -62,6 +61,7 @@ public class FileDataSource {
|
|||||||
* @date 2020年07月31日 16:54:51
|
* @date 2020年07月31日 16:54:51
|
||||||
*/
|
*/
|
||||||
public static List<UserDTO> getUserData() {
|
public static List<UserDTO> getUserData() {
|
||||||
|
folderPath=new FileDataSource().getClass().getResource("/ml-100k").getPath();
|
||||||
List<UserDTO> userList = Lists.newArrayList();
|
List<UserDTO> userList = Lists.newArrayList();
|
||||||
try {
|
try {
|
||||||
FileInputStream out = new FileInputStream(folderPath+"\\u.user");
|
FileInputStream out = new FileInputStream(folderPath+"\\u.user");
|
||||||
@@ -96,6 +96,7 @@ public class FileDataSource {
|
|||||||
* @date 2020年07月31日 16:54:22
|
* @date 2020年07月31日 16:54:22
|
||||||
*/
|
*/
|
||||||
public static List<ItemDTO> getItemData() {
|
public static List<ItemDTO> getItemData() {
|
||||||
|
folderPath=new FileDataSource().getClass().getResource("/ml-100k").getPath();
|
||||||
List<ItemDTO> itemList = Lists.newArrayList();
|
List<ItemDTO> itemList = Lists.newArrayList();
|
||||||
try {
|
try {
|
||||||
FileInputStream out = new FileInputStream(folderPath+"\\u.item");
|
FileInputStream out = new FileInputStream(folderPath+"\\u.item");
|
||||||
|
|||||||
Reference in New Issue
Block a user