Use AI-powered Features

Wordize AI for .NET allows you to translate documents, check grammar, and summarize your document in a few words or sentances.

Wordize provides the Wordize AI for .NET module – a powerful extension that brings advanced AI capabilities to your document workflows.

Wordize AI enables operations such as text summarization, grammar checking, and document translation using cutting-edge models from Anthropic, Google, and OpenAI.

Configure AI models

The Wordize AI module can be connected to Anthropic, Google, and OpenAI models. To do this, just use the appropriate AiModel class and specify the AiModelType.

Connect to the Anthropic AI model:

AiModel model = AnthropicAiModel.Create(AiModelType.Claude35Haiku, "<your_api_key>");

Connect to the Google AI Model:

AiModel model = GoogleAiModel.Create(AiModelType.Gemini15Flash, "<your_api_key>");

Connect to the OpenAI Model:

AiModel model = OpenAiModel.Create(AiModelType.Gpt4OMini, "<your_api_key>").WithOrganization("<organization>").WithProject("<project>");

In addition to the standard models, you can use an LLM deployed on your server. Just select the appropriate AiModel class and specify the URL, name, and ApiKey:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");

Translate Document Using AI

Translating documents using AI is convenient because it provides fast, accurate results without the need for manual effort. It also supports multiple languages and formats, making it easy to work with a wide range of content.

To translate a document, simply specify the input and output files, configure the AI model, and set the target language:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
Translator.Translate("DocumentIn.docx", "DocumentOut.docx", model, Language.Ukrainian);

If you need to render the translation result as an array of streams with images, use the TranslateToImages method:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
Stream[] pages = Translator.TranslateToImages("DocumentIn.docx", new ImageSaveOptions(SaveFormat.Png), model, Language.Ukrainian);

Translating documents using the Fluent API is convenient when you need to save the output in multiple file formats:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
TranslatorContext context = new TranslatorContext(model) { Language = Language.Ukrainian };

Translator.Create(context)
    .From("DocumentIn.docx")
    .To("DocumentOut.docx")
    .To("DocumentOut.pdf")
    .To("DocumentOut.xps")
    .Execute();

Use the following supported languages:

A-BC-D-EF-GH-I-J-KL-M-NO-P-Q-R-SST-U-V-W-X-Y-Z
Afrikaans
AfrikaansSouthAfrica
Albanian
AlbanianAlbania
Alsatian
Amharic
Arabic
ArabicAlgeria
ArabicBahrain
ArabicEgypt
ArabicIraq
ArabicJordan
ArabicKuwait
ArabicLebanon
ArabicLibya
ArabicMorocco
ArabicOman
ArabicQatar
ArabicSaudiArabia
ArabicSyria
ArabicTunisia
ArabicUAE
ArabicYemen
Armenian
ArmenianArmenia
Assamese
Azeri
AzeriCyrillic
AzeriLatin
Basque
BasqueBasque
Belarusian
BelarusianBelarus
Bengali
BengaliBangladesh
BosnianCyrillic
BosnianLatin
BretonBulgarian
Bulgarian
Bulgaria
Burmese
Catalan
CatalanCatalan
Cherokee
ChineseHongKong
ChineseMacao
ChineseChina
ChineseSingapore
ChineseTaiwan
ChineseSimplified
ChineseTraditional
Croatian
CroatianBozniaAndHerzegovina
CroatianCroatia
Czech
CzechCzechRepublic
Danish
DanishDenmark
Divehi
DivehiMaldives
Dutch
DutchBelgium
DutchNetherlands
Edo
English
EnglishAustralia
EnglishBelize
EnglishCanada
EnglishCaribbean
EnglishHongKong
EnglishIndia
EnglishIndonesia
EnglishIreland
EnglishJamaica
EnglishMalaysia
EnglishNewZealand
EnglishPhilippines
EnglishSingapore
EnglishSouthAfrica
EnglishTrinidadAndTobago
EnglishUK
EnglishUS
EnglishZimbabwe
Estonian
EstonianEstonia
Faeroese
FaeroeseFaroeIslands
Filipino
Finnish
FinnishFinland
French
FrenchBelgium
FrenchCameroon
FrenchCanada
FrenchCongo
FrenchCoteDIvoire
FrenchFrance
FrenchHaiti
FrenchLuxembourg
FrenchMali
FrenchMonaco
FrenchMorocco
FrenchReunion
FrenchSenegal
FrenchSwitzerland
FrenchWestIndies
FrisianNetherlands
Fulfulde
GaelicScotland
Galician
GalicianGalician
Georgian
GeorgianGeorgia
German
GermanAustria
GermanGermany
GermanLiechtenstein
GermanLuxembourg
GermanSwitzerland
Greek
GreekGreece
Guarani
Gujarati
GujaratiIndia
Hausa
Hawaiian
Hebrew
HebrewIsrael
Hindi
HindiIndia
Hungarian
HungarianHungary
Ibibio
Icelandic
IcelandicIceland
Igbo
Indonesian
IndonesianIndonesia
Inuktitut
InuktitutLatinCanada
IrishIreland
Italian
ItalianItaly
ItalianSwitzerland
Japanese
JapaneseJapan
Kannada
KannadaIndia
Kanuri
Kashmiri
KashmiriArabic
Kazakh
KazakhKazakhstan
Khmer
Kiswahili
KiswahiliKenya
Konkani
KonkaniIndia
Korean
KoreanKorea
Kyrgyz
KyrgyzKyrgyzstan
Lao
Latin
Latvian
LatvianLatvia
Lithuanian
LithuanianLithuania
LuxembougishLuxemburg
Macedonian
MacedonianFYROM
Malay
MalayMalaysia
MalayBruneiDarussalam
Malayalam
Maltese
Manipuri
Maori
MapudungunChile
Marathi
MarathiIndia
MohawkMohawk
Mongolian
MongolianCyrillic
MongolianMongolian
Nepali
NepaliIndia
Norwegian
NorwegianBokmal
NorwegianNynorsk
Oriya
Oromo
Papiamentu
Pashto
Persian
PersianIran
Polish
PolishPoland
Portuguese
PortugueseBrazil
PortuguesePortugal
Punjabi
PunjabiIndia
PunjabiPakistan
QuechuaBolivia
QuechuaEcuador
QuechuaPeru
Romanian
RomanianMoldova
RomanianRomania
RomanshSwitzerland
Russian
RussianMoldova
RussianRussia
SamiInariFinland
SamiLuleNorway
SamiLuleSweden
SamiNorthernFinland
SamiNorthernNorway
SamiNothernSweden
SamiSkoltFinland
SamiSouthernNorway
SamiSouthernSweden
Sanskrit
SanskritIndia
Sepedi
Serbian
SerbianCyrillicBosniaAndHerzegovina
SerbianCyrillicSerbiaAndMontenegro
SerbianLatinBosniaAndHerzegovina
SerbianLatinSerbiaAndMontenegro
Sindhi
SindhiDevanagaric
Sinhalese
Slovak
SlovakSlovakia
Slovenian
SlovenianSlovenia
Somali
Sorbian
Spanish
SpanishArgentina
SpanishBolivia
SpanishChile
SpanishColombia
SpanishCostaRica
SpanishDominicanRepublic
SpanishEcuador
SpanishElSalvador
SpanishGuatemala
SpanishHonduras
SpanishMexico
SpanishNicaragua
SpanishPanama
SpanishParaguay
SpanishPeru
SpanishPuertoRico
SpanishSpainModernSort
SpanishSpainTraditionalSort
SpanishUruguay
SpanishVenezuela
Sutu
Swedish
SwedishFinland
SwedishSweden
Syriac
SyriacSyria
Tajik
Tamazight
TamazightLatin
Tamil
TamilIndia
Tatar
TatarRussia
Telugu
TeluguIndia
Thai
ThaiThailand
TibetanButan
TibetanChina
TigrignaEritrea
TigrignaEthiopia
Tsonga
Tswana
Turkish
TurkishTurkey
Turkmen
Ukrainian
UkrainianUkraine
Urdu
UrduPakistan
UrduIndian
Uzbek
UzbekCyrillic
UzbekLatin
Venda
Vietnamese
VietnameseVietnam
Welsh
Xhosa
Yi
Yiddish
Yoruba
Zulu

Summarize Document Using AI

Summarizing a document using AI is efficient because it saves time by quickly extracting key points from large volumes of text. It also helps you grasp the main ideas without reading the entire document.

Use the following values to set the summary length:

  • VeryShort – generates 1-2 sentences
  • Short – generates 3-4 sentences
  • Medium – generates 5-6 sentences
  • Long – generates 7-10 sentences
  • VeryLong – generates 11-20 sentences

Pass one or more documents to the Summarizer to produce a concise summary that accurately represents the content:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
Summarizer.Summarize("DocumentIn.docx", "DocumentOut.docx", model, new SummarizeOptions() { SummaryLength = SummaryLength.VeryShort });

If you need to render the summary result as an array of streams with images, use the SummarizeToImages method:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
Stream[] pages = Summarizer.SummarizeToImages("DocumentIn.docx", new ImageSaveOptions(SaveFormat.Png), model);

Easily specify multiple input documents for summarization and save the output in all required formats with a single call using the Fluent API:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
SummarizerContext context = new SummarizerContext(model);
context.SummarizeOptions.SummaryLength = SummaryLength.Long;

Summarizer.Create(context)
    .From("DocumentIn1.docx")
    .From("DocumentIn2.docx")
    .To("DocumentOut.docx")
    .To("DocumentOut.pdf")
    .To("DocumentOut.html")
    .Execute();

Check Grammar Using AI

Checking grammar in a document using AI saves time by automatically identifying and suggesting corrections for errors. It also ensures consistency and improves the overall quality of your text without the need for manual proofreading.

Use the GrammarChecker to correct spelling, fix grammatical errors and typos, improve stylistic quality, and optionally track changes using revisions for later review:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
GrammarChecker.CheckGrammar("DocumentIn.docx", "DocumentOut.docx", model);

Mark corrections with revisions:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
GrammarChecker.CheckGrammar("DocumentIn.docx", "DocumentOut.docx", model, new CheckGrammarOptions() { MakeRevisions = true });

If you need to render the checked result as an array of streams with images, use the CheckGrammarToImages method:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
Stream[] pages = GrammarChecker.CheckGrammarToImages("DocumentIn.docx", new ImageSaveOptions(SaveFormat.Png), model, new CheckGrammarOptions() { ImproveStylistics = true });

Checking grammar with the Fluent API:

AiModel model = OpenAiModel.Create("<api_url>", "<api_name>", "<api_key>");
GrammarCheckerContext context = new GrammarCheckerContext(model);
context.CheckGrammarOptions.MakeRevisions = true;

GrammarChecker.Create(context)
    .From("DocumentIn.docx")
    .To("DocumentOut.docx")
    .Execute();