Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Овечкин Илья #193

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

magnat0
Copy link

@magnat0 magnat0 commented Jan 23, 2024

Copy link

@elybelyaev elybelyaev left a comment

Choose a reason for hiding this comment

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

Пробежимся по критериям

Обязательные пункты:
Исходный текст:
✅ Источником данных должен быть файл со словами по одному в строке.
Предобработка слов:
✅ На этапе предобработки, приведи все слова к нижнему регистру и исключи скучные слова
Формат результата:
✅ В качестве результата программа должна генерировать png-файл.
✅ Должна быть возможность задать цвета, шрифт и размер изображения.

Алгоритм
✅ Сделай так, чтобы по одному тексту можно было сгенерировать несколько облаков тегов с помощью разных алгоритмов или одного алгоритма с разными настройками.

GUI или Console:
✅ Организуй код так, чтобы было легко сделать оба вида клиентов — и клиента командной строки, и GUI приложение с вводом параметров и интерактивным просмотром. (оставил комментарий в коде, пункт близится к закрытию)
✅ Реализуй одного клиента по выбору

Пункты на перспективу:
Предобработка слов:
✅ дать возможность влиять на список скучных слов, которые не попадут в облако.

Формат результата:
✅ поддерживать разные форматы изображений.

this.tagCloudClient = tagCloudClient;
}

public string Category => "���������";

This comment was marked as resolved.

var wordFrequencies = new Dictionary<string, int>();
var interestingWords = GetInterestingWords(sourceFilePath, boringFilePath);

for (int i = 0; i < interestingWords.Count; i++)

This comment was marked as resolved.

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="4.0.1" />

This comment was marked as off-topic.

This comment was marked as off-topic.


namespace TagsCloudContainer.Actions
{
public class TagCloudClient : ITagCloudClient

This comment was marked as resolved.

Comment on lines 36 to 44
var dialog = new SaveFileDialog
{
CheckFileExists = false,
InitialDirectory = Path.GetFullPath(filePath),
DefaultExt = "png",
FileName = "image.png",
Filter = "����������� (*.png)|*.png|����������� (*.jpg)|*.jpg|����������� (*.bmp)|*.bmp"
};
var res = dialog.ShowDialog();

This comment was marked as resolved.

{
get => sourceFilePath;
set => sourceFilePath = File.Exists(value) ? value : sourceFilePath;
}

This comment was marked as resolved.

set => boringFilePath = File.Exists(value) ? value : boringFilePath;
}

public static string GetProjectDirectory()

This comment was marked as resolved.

Comment on lines 1 to 3
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

This comment was marked as resolved.

return new ToolStripMenuItem(name, null, menuItems);
}

public static ToolStripItem ToMenuItem(this IUiAction action)

This comment was marked as resolved.

Comment on lines 37 to 53
builder.RegisterType<MainForm>().As<Form>();
builder.RegisterType<ImageSettings>().AsSelf().SingleInstance();
builder.RegisterType<FileSettings>().AsSelf().SingleInstance();
builder.RegisterType<AlgorithmSettings>().AsSelf().SingleInstance();
builder.RegisterType<PictureBox>().AsSelf().SingleInstance();
builder.RegisterType<FileParser>().As<IFileParser>();
builder.RegisterType<WordProcessor>().As<IWordProcessor>();
builder.RegisterType<CircularCloudLayouter>().As<ICloudLayouter>();
builder.RegisterType<TagCloudDrawer>().As<IDrawer>();
builder.RegisterType<SelectBoringWordsFileAction>().As<IUiAction>();
builder.RegisterType<SelectSourceFileAction>().As<IUiAction>();
builder.RegisterType<SaveImageAction>().As<IUiAction>();
builder.RegisterType<AlgorithmSettingsAction>().As<IUiAction>();
builder.RegisterType<ImageSettingsAction>().As<IUiAction>();
builder.RegisterType<DrawTagCloudAction>().As<IUiAction>();
builder.RegisterType<TagCloudClient>().As<ITagCloudClient>();
builder.RegisterType<RectanglePlacer>().As<IRectanglePlacer>();

This comment was marked as resolved.


public static ContainerBuilder CreateBuilder()
{
var builder = new ContainerBuilder();

This comment was marked as resolved.

{
var algSettings = new AlgorithmSettings();
var imgSettings = new ImageSettings();
layouter = new CircularCloudLayouter(algSettings, imgSettings);

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants