Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
seth-mg committed Apr 19, 2024
2 parents 808a366 + be47380 commit 12dec65
Show file tree
Hide file tree
Showing 18 changed files with 1,967 additions and 21 deletions.
5 changes: 4 additions & 1 deletion CI.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ node ("docker-light") {
mono /opt/sonar-scanner/SonarScanner.MSBuild.exe end /d:sonar.login=\"${env.SONAR_AUTH_TOKEN}\" && \
echo && \
echo [INFO] Running unit tests && \
mono ./packages/NUnit.Console.3.0.1/tools/nunit3-console.exe ./rosette_apiUnitTests/bin/Release/rosette_apiUnitTests.dll\""
mono ./packages/NUnit.Console.3.0.1/tools/nunit3-console.exe ./rosette_apiUnitTests/bin/Release/rosette_apiUnitTests.dll && \
echo && \
echo [INFO] Re-permission files for cleanup. && \
chown -R 9960:9960 /source\""

// TODO: Finish coverage data gathering for Sonar.
///opt/maven-basis/bin/mvn --batch-mode clean install sonar:sonar $mySonarOpts\""
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<a href="https://www.babelstreet.com/rosette"><img src="https://s3.amazonaws.com/styleguide.basistech.com/logos/rosette-logo.png" width="181" height="47" /></a>
<a href="https://www.babelstreet.com/rosette"><img src="https://charts.babelstreet.com/icon.png" width="47" height="60"/></a>
# Rosette by Babel Street

---

[![NuGet version](https://badge.fury.io/nu/rosette_api.svg)](https://badge.fury.io/nu/rosette_api)

## Rosette API
The Rosette Text Analytics Platform uses natural language processing, statistical modeling, and machine learning to
analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable
information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and
comparing the similarity of names, categorizing and adding linguistic tags to text and more.
Rosette uses natural language processing, statistical modeling, and machine learning to analyze unstructured and semi-structured text across hundreds of language-script combinations, revealing valuable information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and comparing the similarity of names, categorizing and adding linguistic tags to text and more. Rosette Server is the on-premises installation of Rosette, with access to Rosette's functions as RESTful web service endpoints. This solves cloud security worries and allows customization (models/indexes) as needed for your business.


## Rosette API Access
- Rosette Cloud [Sign Up](https://developer.rosette.com/signup)
Expand All @@ -32,11 +30,10 @@ in the [examples](https://github.com/rosette-api/csharp/tree/develop/rosette_api

#### Documentation & Support
- [Binding API](https://rosette-api.github.io/csharp/)
- [Rosette Platform API](https://developer.rosette.com/features-and-functions)
- [Rosette Platform API](https://docs.babelstreet.com/API/en/index-en.html)
- [Binding Release Notes](https://github.com/rosette-api/csharp/wiki/Release-Notes)
- [Rosette Platform Release Notes](https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes)
- [Binding/Rosette Platform Compatibility](https://developer.rosette.com/features-and-functions?csharp#)
- [Support](https://support.rosette.com)
- [Rosette Platform Release Notes](https://babelstreet.my.site.com/support/s/article/Rosette-Cloud-Release-Notes)
- [Support](https://babelstreet.my.site.com/support/s/)
- [Binding License: Apache 2.0](https://github.com/rosette-api/csharp/blob/develop/LICENSE.txt)

## Concurrency
Expand Down
31 changes: 31 additions & 0 deletions recompile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# step into the directory of the script
cd "$(dirname "$0")"


# compile the project
nuget restore rosette_api.sln
msbuild /p:Configuration=Release rosette_api.sln
# if last command is empty then exit
if [ $? -ne 0 ]; then
exit 1
fi

cp packages/Newtonsoft.Json.13.0.2/lib/net45/Newtonsoft.Json.dll rosette_apiExamples/.
cp rosette_api/bin/Release/rosette_api.dll rosette_apiExamples/.
cd rosette_apiExamples
# Loop over parameters
for filename in "$@"
do
if [ -f "${filename}.cs" ]; then
echo "####> Compiling and running ${filename} example"
csc "${filename}.cs" /r:rosette_api.dll /r:System.Net.Http.dll /r:System.Web.Extensions.dll /r:Newtonsoft.Json.dll
# if last command is empty then exit
if [ $? -eq 0 ]; then
mono "${filename}.exe"
fi
else
echo "####> File ${filename}.cs not found in rosette_apiExamples directory"
fi
done
17 changes: 16 additions & 1 deletion rosette_api/CAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public enum MorphologyFeature
/// <summary>C# Rosette API.
/// <para>
/// Primary class for interfacing with the Rosette API
/// @copyright 2014-2017 Basis Technology Corporation.
/// @copyright 2014-2024 Basis Technology Corporation.
/// Licensed under the Apache License, Version 2.0 (the "License"); you may not use file except in compliance
/// with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
/// Unless required by applicable law or agreed to in writing, software distributed under the License is
Expand Down Expand Up @@ -678,6 +678,21 @@ public MorphologyResponse Morphology(RosetteFile file, MorphologyFeature feature
return Process<MorphologyResponse>(file);
}

/// <summary>RecordSimilarity
/// <para>
/// (POST)RecordSimilarity Endpoint: Returns the result of matching 2 lists of records.
/// </para>
/// </summary>
/// <param name="request">RecordSimilarityRequest: RecordSimilarityRequest object to send</param>
/// <returns>RecordSimilarityResponse containing the results of the request.
/// </returns>
public RecordSimilarityResponse RecordSimilarity(RecordSimilarityRequest request)
{
_uri = "record-similarity";

return GetResponse<RecordSimilarityResponse>(JsonConvert.SerializeObject(request, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }));
}

/// <summary>NameSimilarity
/// <para>
/// (POST)NameSimilarity Endpoint: Returns the result of matching 2 names.
Expand Down
2 changes: 1 addition & 1 deletion rosette_api/NameSimilarityResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace rosette_api
{
/// <summary>
/// A class to represnt the results from the Name Similarity endpoint of the Rosette API
/// A class to represent the results from the Name Similarity endpoint of the Rosette API
/// </summary>
[JsonObject(MemberSerialization.OptOut)]
public class NameSimilarityResponse : RosetteResponse
Expand Down
6 changes: 3 additions & 3 deletions rosette_api/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.28.0.0")]
[assembly: AssemblyVersion("1.28.0.0")]
[assembly: AssemblyFileVersion("1.28.0.0")]
// [assembly: AssemblyVersion("1.29.0.0")]
[assembly: AssemblyVersion("1.29.0.0")]
[assembly: AssemblyFileVersion("1.29.0.0")]
31 changes: 31 additions & 0 deletions rosette_api/RecordSimilarityConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using Newtonsoft.Json;

namespace rosette_api {

/// <summary>
/// JsonConverter for Unfielded Record Similarity objects
/// </summary>
public class UnfieldedRecordSimilarityConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return true;
}

public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
writer.WriteValue(value.ToString());
}

public override bool CanRead
{
get { return false; }
}

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
throw new NotImplementedException();
}
}
}
Loading

0 comments on commit 12dec65

Please sign in to comment.