Code Monkey home page Code Monkey logo

newsrecommend's Introduction

NewsRecommend

基于协同过滤算法的新闻推荐系统, 项目分前后端与爬虫.

实现热点新闻推荐以及个性化新闻推荐.

项目的具体说明

喜欢的话, 可以点个 star 奥.

项目分支

  • main: 主分支, 保存最新的可预览状态.
  • dev: Mac 上的开发分支
  • dev-win: Win 上的开发分支

不同分支使用的数据库名称可能并不一致, 以各个分支中的 NewsRecommend.sql 文件为准

数据库 NewsRecommend.sql

MySQL 导入自动建库

爬虫 spider

运行

爬虫独立运行获取数据后写入数据库, 数据来源为 今日头条, 需要 python 3 环境.

spider 目录下创建 properties/database.json.
database.json 模板:

{
  "name": "NewsRecommend",
  "user": "your name",
  "pass": "your pass",
  "host": "your host",
  "charset": "utf8mb4"
}

并在 spider 目录下创建 log 目录,用于存放日志文件 (我懒得写)

正确安装 webdriver 后执行:

cd spider
python Main.py

前端 front

前端利用 Vue Cli 3 脚手架. 需要 node.js yarn.

应该需要先装 wangeditor (富文本编辑工具) npm install wangeditor

运行

cd front
yarn install
yarn serve

后端 back

后端基于 SpringBoot 与 MyBatis.

现在工程目录下的 src/main/resources 中创建 application.properties 文件, 内容大致如下:

spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://[主机名]:3306/[数据库名称]?useUnicode=true&characterEncoding=utf8&useSSL=true
spring.datasource.username = [用户名]
spring.datasource.password = [密码]
mybatis.configuration.map-underscore-to-camel-case=true
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl

预览

首页

newsrecommend's People

Contributors

smacul avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.