Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13200)

Issue 237480043: ShadPython - 2 - Alexander Andrianov - FIVT

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 11 months ago by lxndr.ndrnv
Modified:
8 years, 11 months ago
Reviewers:
shad.python
Visibility:
Public.

Patch Set 1 #

Total comments: 6

Patch Set 2 : fixes #

Total comments: 6

Patch Set 3 : more fixes #

Patch Set 4 : textgenerator class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -0 lines) Patch
M textgen.py View 1 chunk +164 lines, -0 lines 0 comments Download

Messages

Total messages: 5
shad.python
https://codereview.appspot.com/237480043/diff/1/textgen.py File textgen.py (right): https://codereview.appspot.com/237480043/diff/1/textgen.py#newcode24 textgen.py:24: k = " ".join([t for t in tokens[i:i + ...
8 years, 11 months ago (2015-05-31 12:57:03 UTC) #1
lxndr.ndrnv
Вопрос по последнему комментарию https://codereview.appspot.com/237480043/diff/1/textgen.py File textgen.py (right): https://codereview.appspot.com/237480043/diff/1/textgen.py#newcode24 textgen.py:24: k = " ".join([t for ...
8 years, 11 months ago (2015-05-31 16:12:32 UTC) #2
lxndr.ndrnv
8 years, 11 months ago (2015-06-02 12:44:13 UTC) #3
shad.python
https://codereview.appspot.com/237480043/diff/20001/textgen.py File textgen.py (right): https://codereview.appspot.com/237480043/diff/20001/textgen.py#newcode33 textgen.py:33: def get_probabilities(chains, f): Слово get здесь немного сбивает с ...
8 years, 11 months ago (2015-06-05 13:01:03 UTC) #4
lxndr.ndrnv
8 years, 11 months ago (2015-06-05 14:24:18 UTC) #5
https://codereview.appspot.com/237480043/diff/20001/textgen.py
File textgen.py (right):

https://codereview.appspot.com/237480043/diff/20001/textgen.py#newcode33
textgen.py:33: def get_probabilities(chains, f):
On 2015/06/05 13:01:03, shad.python wrote:
> Слово get здесь немного сбивает с толку, как будто эта функция должна вернуть
> вероятность. Лучше использовать write или output.

Done.

https://codereview.appspot.com/237480043/diff/20001/textgen.py#newcode41
textgen.py:41: def generate_text(max_depth, cdfs, text_size):
On 2015/06/05 13:01:02, shad.python wrote:
> cdfs - непонятное название

Done.

https://codereview.appspot.com/237480043/diff/20001/textgen.py#newcode125
textgen.py:125: frequencies = sorted(list(frequencies), key=lambda x: x[1])
On 2015/06/05 13:01:03, shad.python wrote:
> Этот код частично дублируется. Сделайте отдельную функцию "превратить частоты
в
> вероятности". Кроме того, все остальное тоже лучше выделить в отдельную
функцию,
> чтобы при необходимости обучать модель в другом месте кода можно было бы
просто
> вызвать эту функцию. Еще было бы удобно собрать функции обучения и генерации в
> класс, чтобы скрыть от пользователя подробности реализации.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b