Skip to content

768_content_objects_3level#786

Open
LapshinAE0 wants to merge 8 commits into
devfrom
768_content_objects_3level
Open

768_content_objects_3level#786
LapshinAE0 wants to merge 8 commits into
devfrom
768_content_objects_3level

Conversation

@LapshinAE0

Copy link
Copy Markdown
Collaborator

No description provided.

@HadronCollider HadronCollider left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Содержание не находится даже в шаблоне ВКР (где он должен быть правильным) - изучите как работает headers и make_chapters - содержание к ним не относится
Image
  • более того, в задаче идет речь о тексте содержания - там нет headers['level'] (т.к. это обычный текст, а не заголовки)

@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Mar 16, 2026
@HadronCollider
HadronCollider changed the base branch from master to dev July 17, 2026 12:16
@github-actions github-actions Bot added the has conflicts if new merge has conflicts label Jul 17, 2026
@github-actions github-actions Bot removed the has conflicts if new merge has conflicts label Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сделайте критерий параметризуемым (параметр - максимально разрешенная глубина) - не во всех работах запрещена глубина 3, или через N лет надо будет менять захардкоженную глубину

for paragraph in paragraphs:
text_par = paragraph.paragraph_text.strip()

if "СОДЕРЖАНИЕ" in text_par:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если будет "Содержание" - критерий уже не пройдет

if self._is_level_3_or_higher_in_content(text_par):
failed_str.append(text_par)

if "ОПРЕДЕЛЕНИЯ, ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ" in text_par:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не во всех документах есть данный раздел

if not bool_end_content_find:
return answer(
False,
"Не найдено заголовка 'ОПРЕДЕЛЕНИЯ, ОБОЗНАЧЕНИЯ И СОКРАЩЕНИЯ' (заголовок второго уровня),"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

см. выше

result_str = (
f"Найдено {len(failed_str)} заголовков 3 уровня и выше:<br>"
f"Заголовки третьего уровня и выше: {'<br> '.join(failed_str)}"
"<br>Содержание должно содержать только заголовки 1 и 2 уровня.<br>"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

уточните в фидбеке, что такое 1-2 уровень и как исправить проблемные - чтобы были понятные шаги к исправлению

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants