Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxxbw54/AnswerBot
Replication package of the paper "AnswerBot: An Answer Summary Generation Tool Based on Stack Overflow"
https://github.com/maxxbw54/AnswerBot
Last synced: 3 months ago
JSON representation
Replication package of the paper "AnswerBot: An Answer Summary Generation Tool Based on Stack Overflow"
- Host: GitHub
- URL: https://github.com/maxxbw54/AnswerBot
- Owner: maxxbw54
- Created: 2018-11-28T05:49:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T05:52:27.000Z (over 5 years ago)
- Last Synced: 2024-07-28T21:38:50.382Z (3 months ago)
- Language: Python
- Homepage:
- Size: 12.2 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-software-engineering-research - AnswerBot
README
# AnswerBot [Tool Demo](http://answerbot.cn/)
## Required Database
```odpsql
drop database if exists `answerbot`;
CREATE DATABASE IF NOT EXISTS `answerbot` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
```## Required tables
### postlink1. Create table
```odpsql
use answerbot;
CREATE TABLE post_links (
Id INT NOT NULL PRIMARY KEY,
CreationDate DATETIME,
PostId INT,
RelatedPostId INT,
LinkTypeId INT
);load xml local infile '/data/bowen/Post2Vec/data/sources/SO-05-Sep-2018/PostLinks.xml'
into table post_links
rows identified by '';
```### java_qs
1. Create table
```odpsql
CREATE TABLE java_qs (
Id INT NOT NULL PRIMARY KEY,
PostTypeId SMALLINT,
AcceptedAnswerId INT,
CreationDate DATETIME,
Score INT NULL,
ViewCount INT NULL,
Body text NULL,
OwnerUserId INT,
LastEditorUserId INT,
LastEditDate DATETIME,
LastActivityDate DATETIME,
Title varchar(256),
Tags VARCHAR(256),
AnswerCount INT,
CommentCount INT,
FavoriteCount INT,
CommunityOwnedDate DATETIME,
ParentId INT
);# index
create index java_qs_idx on java_qs(Id);
```2. Insert data
```odpsql
INSERT INTO answerbot.java_qs SELECT * FROM `05-Sep-2018-SO`.posts WHERE Tags LIKE '%%' AND AnswerCount > 0 AND PostTypeId = 1;
```### java_ans
```odpsql
CREATE TABLE java_ans (
Id INT NOT NULL PRIMARY KEY,
PostTypeId SMALLINT,
AcceptedAnswerId INT,
CreationDate DATETIME,
Score INT NULL,
ViewCount INT NULL,
Body text NULL,
OwnerUserId INT,
LastEditorUserId INT,
LastEditDate DATETIME,
LastActivityDate DATETIME,
Title varchar(256),
Tags VARCHAR(256),
AnswerCount INT,
CommentCount INT,
FavoriteCount INT,
CommunityOwnedDate DATETIME,
ParentId INT
);# index
create index java_ans_idx on java_ans(Id);
ALTER TABLE java_ans ADD INDEX pid2(PostTypeId, ParentId);
```2. Insert data
```odpsql
INSERT INTO answerbot.java_ans select * from `05-Sep-2018-SO`.posts where PostTypeId = 2 AND ParentId in (select Id from `05-Sep-2018-SO`.posts where Tags like '%%' and PostTypeId = 1);
```