Skip to content

Commit

Permalink
refine the example data
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhang2029 committed Dec 19, 2017
1 parent fd1f7af commit dc887df
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
32 changes: 16 additions & 16 deletions dssm/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,49 +216,49 @@ Pairwise Rank复用上面的DNN结构,同一个source对两个target求相似
### 回归的数据格式
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - source word list
# - target word list
# - target
<ids> \t <ids> \t <float>
<word list> \t <word list> \t <float>
```

比如:

```
3 6 10 \t 6 8 33 \t 0.7
6 0 \t 6 9 330 \t 0.03
苹果 六 袋 苹果 6s 0.1
新手 汽车 驾驶 驾校 培训 0.9
```
### 分类的数据格式
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - source word list
# - target word list
# - target
<ids> \t <ids> \t <label>
<word list> \t <word list> \t <label>
```

比如:

```
3 6 10 \t 6 8 33 \t 0
6 10 \t 8 3 1 \t 1
苹果 六 袋 苹果 6s 0
新手 汽车 驾驶 驾校 培训 1
```

### 排序的数据格式
```
# 4 fields each line:
# - source's word ids
# - target1's word ids
# - target2's word ids
# - source word list
# - target1 word list
# - target2 word list
# - label
<ids> \t <ids> \t <ids> \t <label>
<word list> \t <word list> \t <word list> \t <label>
```

比如:

```
7 2 4 \t 2 10 12 \t 9 2 7 10 23 \t 0
7 2 4 \t 10 12 \t 9 2 21 23 \t 1
苹果 六 袋 苹果 6s 新手 汽车 驾驶 1
新手 汽车 驾驶 驾校 培训 苹果 6s 1
```

## 执行训练
Expand Down
32 changes: 16 additions & 16 deletions dssm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,52 +190,52 @@ Below is a simple example for the data in `./data`
### Regression data format
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - source word list
# - target word list
# - target
<ids> \t <ids> \t <float>
<word list> \t <word list> \t <float>
```

The example of this format is as follows.

```
3 6 10 \t 6 8 33 \t 0.7
6 0 \t 6 9 330 \t 0.03
Six bags of apples Apple 6s 0.1
The new driver The driving school 0.9
```

### Classification data format
```
# 3 fields each line:
# - source's word ids
# - target's word ids
# - source word list
# - target word list
# - target
<ids> \t <ids> \t <label>
<word list> \t <word list> \t <label>
```

The example of this format is as follows.


```
3 6 10 \t 6 8 33 \t 0
6 10 \t 8 3 1 \t 1
Six bags of apples Apple 6s 0
The new driver The driving school 1
```


### Ranking data format
```
# 4 fields each line:
# - source's word ids
# - target1's word ids
# - target2's word ids
# - source word list
# - target1 word list
# - target2 word list
# - label
<ids> \t <ids> \t <ids> \t <label>
<word list> \t <word list> \t <word list> \t <label>
```

The example of this format is as follows.

```
7 2 4 \t 2 10 12 \t 9 2 7 10 23 \t 0
7 2 4 \t 10 12 \t 9 2 21 23 \t 1
Six bags of apples Apple 6s The new driver 1
The new driver The driving school Apple 6s 1
```

## Training
Expand Down

0 comments on commit dc887df

Please sign in to comment.