Document AI
The Aspose.Words Document AI for .NET plugin omogućava programerima da prevode ili sumiraju dokumente i proveravaju njihovu gramatiку. Integrira se sa LLM-ovima kao što su Gemini, Claude i OpenAI.
Instalacija i podešavanje
- Instalirajte Aspose.Words za .NET paket preko NuGet-a ili Package Manager Console-a.
- Konfigurišite Metered Licensing pre nego što pokrenete mail-merge operacije.
Kompatibilno sa Windows, Linux, macOS i mobilne platforme koristeći .NET Framework, .NET Core ili Mono. Podržani IDE‑ovi uključuju Visual Studio (2010–2026), Xamarin i MonoDevelop 2.4+.
IDE‑i: Visual Studio 2017–2026, JetBrains Rider, MonoDevelop.
Podržani formati šablona / izlaza: DOC, DOCX, RTF, DOT, DOTX, DOTM, DOCM, Word 2003 XML i Word 2007 XML.
Prevedi dokument
Prevedite svoje dokumente na bilo koji jezik koji je predstavljen u Jezik enumeraciji:
Document doc = new Document(MyDir + "Document.docx");
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
// Use Google generative language models.
AiModel model = AiModel.Create(AiModelType.GeminiFlashLatest).WithApiKey(apiKey);
Document translatedDoc = model.Translate(doc, Language.Arabic);
translatedDoc.Save(ArtifactsDir + "AI.AiTranslate.docx");Sažmi dokument
Generišite rezime dokumenta, navodeći njegovu dužinu:
- VrloKratko – 1-2 rečenice
- Kratko – 3-4 rečenice
- Srednje – 5-6 rečenice
- Dugo – 7-10 rečenica
- VrloDugo – 11-20 rečenica
Document firstDoc = new Document("Big document.docx");
Document secondDoc = new Document("Document.docx");
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
// Use OpenAI or Google generative language models.
AiModel model = ((OpenAiModel)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey)).WithOrganization("Organization").WithProject("Project");
SummarizeOptions options = new SummarizeOptions();
options.SummaryLength = SummaryLength.Short;
Document oneDocumentSummary = model.Summarize(firstDoc, options);
oneDocumentSummary.Save("AI.AiSummarize.One.docx");
options.SummaryLength = SummaryLength.Long;
Document multiDocumentSummary = model.Summarize(new Document[] { firstDoc, secondDoc }, options);
multiDocumentSummary.Save("AI.AiSummarize.Multi.docx");Proveri gramatiku dokumenta
Proveri gramatiku i otkrij greške u dokumentima:
Document doc = new Document(MyDir + "Big document.docx");
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
// Use OpenAI generative language models.
AiModel model = AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey);
CheckGrammarOptions grammarOptions = new CheckGrammarOptions();
grammarOptions.ImproveStylistics = true;
Document proofedDoc = model.CheckGrammar(doc, grammarOptions);
proofedDoc.Save("AI.AiGrammar.docx");Često postavljana pitanja
- Q: Koje formate fajlova mogu koristiti sa Document AI za .NET? The Aspose.Words Document AI for .NET plugin podržava DOC, DOCX, RTF, DOT, DOTX, DOTM, DOCM, Word 2003 XML i Word 2007 XML formate.
- Q: Koje modele mogu koristiti sa Aspose.Words Document AI za .NET? Document AI za .NET može biti integrisan sa LLM-ovima kao što su Gemini, Claude i OpenAI.