MrBroccoli.CambridgeDictionary.Cli 1.0.1-alpha

This is a prerelease version of MrBroccoli.CambridgeDictionary.Cli.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MrBroccoli.CambridgeDictionary.Cli --version 1.0.1-alpha
NuGet\Install-Package MrBroccoli.CambridgeDictionary.Cli -Version 1.0.1-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MrBroccoli.CambridgeDictionary.Cli" Version="1.0.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MrBroccoli.CambridgeDictionary.Cli --version 1.0.1-alpha
#r "nuget: MrBroccoli.CambridgeDictionary.Cli, 1.0.1-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MrBroccoli.CambridgeDictionary.Cli as a Cake Addin
#addin nuget:?package=MrBroccoli.CambridgeDictionary.Cli&version=1.0.1-alpha&prerelease

// Install MrBroccoli.CambridgeDictionary.Cli as a Cake Tool
#tool nuget:?package=MrBroccoli.CambridgeDictionary.Cli&version=1.0.1-alpha&prerelease

CambridgeDictionary 📖:books:

A simple and consistent lib to query the meaning of words on the Cambridge dictionary

Dependencies

ScrapySharp

Features I mind implement

  • Meanings
  • Similar words sugestion
  • Phonetics

As I had implemented all the basics features I'm going to enhance the results, performance, and documentation in the next few days to get an alfa version ASAP.

Next Steps

  • Release alfa version
  • Setup a simple CI/CD mechanism on Github
  • Unit Tests

Nuget

The lib is finally available on Nuget: https://www.nuget.org/packages/MrBroccoli.CambridgeDictionary.Cli

Setup

You just need to add it to your service collection as follow:

using CambridgeDictionary.Cli.Extensions;

--

var serviceCollection = new ServiceCollection();
serviceCollection.AddCambridgeDictionary();

var serviceProvider = serviceCollection.BuildServiceProvider();
var cambridgeDictionary = serviceProvider.GetService<ICambridgeDictionaryCli>();

After that, the lib would be available to use.

Usage

Currently, the lib only has an method called GetMeaning:

/// <summary>
/// Search for the meaning and other information of the word on the dictionary
/// </summary>
/// <param name="word">It's the word to be searched.</param>
/// <returns>The information about the word on the dictionary</returns>
Meaning GetMeaning(string word);

Response

The Meaning response looks like this:

{
    string Word - Word you searched
    string Headline - The definition fetched from a meta attribute instead of reading all the page
    IEnumerable<EntrySet> EntrySets - All the possible meanings with examples and guide word whether it's available
    {
        string GuideWord - Word that helps you find the right meaning when a word has more than one meaning
        IEnumerable<Entry> Entries
        {
            string Type - The word class
            string Definition - The meaning itself
            IEnumerable<string> Examples - Examples of sentences using the searched word
        }
    }
    IEnumerable<string> SimilarWords - Similar words suggestion when the searched word wasn't found
    string Raw - The raw meaning page
}

I'm lurking this other two project:

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 365 7/4/2021
1.1.0-alpha 325 7/4/2021
1.0.1-alpha 223 7/1/2021

New Features

- Method GetMeaning(string word)