Skip to content

Commit

Permalink
Merge pull request #14 from michaelpaulus/master
Browse files Browse the repository at this point in the history
#13 Updated extensions to be internal so consuming projects don't pic…
  • Loading branch information
nickhodge authored Sep 25, 2023
2 parents 2ea5aa8 + f3a79b7 commit 5f5aff1
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 60 deletions.
4 changes: 4 additions & 0 deletions SharpSimpleNLG/SharpSimpleNLG.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<DebugSymbols>False</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="SharpSimpleNLGTests" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="lexicon\default-lexicon.xml" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions SharpSimpleNLG/features/FeatureExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

namespace SimpleNLG.Extensions
{
public static class FeatureExtensions

internal static class FeatureExtensions
{
public static string ToString(this Feature f)
{
Expand Down
2 changes: 1 addition & 1 deletion SharpSimpleNLG/features/GenderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace SimpleNLG.Extensions
{
public static class GenderEnumExtensions
internal static class GenderEnumExtensions
{
public static int ordinal(this Gender g)
{
Expand Down
98 changes: 49 additions & 49 deletions SharpSimpleNLG/features/InternalFeatureExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,53 +26,53 @@

namespace SimpleNLG.Extensions
{
public static class InternalFeatureExtensions
{
public static string ToString(this InternalFeature intf)
{
switch (intf)
{
case InternalFeature.ACRONYM:
return "acronym";
case InternalFeature.BASE_WORD:
return "base_word";
case InternalFeature.CLAUSE_STATUS:
return "clause_status";
case InternalFeature.COMPLEMENTS:
return "complements";
case InternalFeature.COMPONENTS:
return "components";
case InternalFeature.COORDINATES:
return "coordinates";
case InternalFeature.DISCOURSE_FUNCTION:
return "discourse_function";
case InternalFeature.NON_MORPH:
return "non_morph";
case InternalFeature.FRONT_MODIFIERS:
return "front_modifiers";
case InternalFeature.HEAD:
return "head";
case InternalFeature.IGNORE_MODAL:
return "ignore_modal";
case InternalFeature.INTERROGATIVE:
return "interrogative";
case InternalFeature.POSTMODIFIERS:
return "postmodifiers";
case InternalFeature.PREMODIFIERS:
return "premodifiers";
case InternalFeature.RAISED:
return "raised";
case InternalFeature.REALISE_AUXILIARY:
return "realise_auxiliary";
case InternalFeature.SPECIFIER:
return "specifier";
case InternalFeature.SUBJECTS:
return "subjects";
case InternalFeature.VERB_PHRASE:
return "verb_phrase";
default:
return "";
}
}
}
internal static class InternalFeatureExtensions
{
public static string ToString(this InternalFeature intf)
{
switch (intf)
{
case InternalFeature.ACRONYM:
return "acronym";
case InternalFeature.BASE_WORD:
return "base_word";
case InternalFeature.CLAUSE_STATUS:
return "clause_status";
case InternalFeature.COMPLEMENTS:
return "complements";
case InternalFeature.COMPONENTS:
return "components";
case InternalFeature.COORDINATES:
return "coordinates";
case InternalFeature.DISCOURSE_FUNCTION:
return "discourse_function";
case InternalFeature.NON_MORPH:
return "non_morph";
case InternalFeature.FRONT_MODIFIERS:
return "front_modifiers";
case InternalFeature.HEAD:
return "head";
case InternalFeature.IGNORE_MODAL:
return "ignore_modal";
case InternalFeature.INTERROGATIVE:
return "interrogative";
case InternalFeature.POSTMODIFIERS:
return "postmodifiers";
case InternalFeature.PREMODIFIERS:
return "premodifiers";
case InternalFeature.RAISED:
return "raised";
case InternalFeature.REALISE_AUXILIARY:
return "realise_auxiliary";
case InternalFeature.SPECIFIER:
return "specifier";
case InternalFeature.SUBJECTS:
return "subjects";
case InternalFeature.VERB_PHRASE:
return "verb_phrase";
default:
return "";
}
}
}
}
2 changes: 1 addition & 1 deletion SharpSimpleNLG/features/InterrogativeTypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace SimpleNLG.Extensions
* <code>false</code> otherwise.
*/

public static class InterrogativeTypeExtensions
internal static class InterrogativeTypeExtensions
{
/**
* A method to determine if the {@code InterrogativeType} is a question
Expand Down
2 changes: 1 addition & 1 deletion SharpSimpleNLG/features/PersonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace SimpleNLG.Extensions
{
public static class PersonEnumExtensions
internal static class PersonEnumExtensions
{
public static int ordinal(this Person p)
{
Expand Down
4 changes: 2 additions & 2 deletions SharpSimpleNLG/features/TenseExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

namespace SimpleNLG.Extensions
{
public static class TenseExtensions

internal static class TenseExtensions
{
public static Tense ToTense(this string s)
{
Expand Down
2 changes: 1 addition & 1 deletion SharpSimpleNLG/framework/DocumentCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public interface IDocumentCategory: IElementCategory
}


public static class DocumentCategoryExtensions {
internal static class DocumentCategoryExtensions {
public static bool hasSubPart(this IElementCategory sourceElementCategory, IElementCategory elementCategory)
{
var subPart = false;
Expand Down
2 changes: 1 addition & 1 deletion SharpSimpleNLG/helperextensions/EqualsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace SimpleNLG.Extensions
{
public static class EqualsExtensions
internal static class EqualsExtensions
{
public static bool equals(this Dictionary<string, object> s, Dictionary<string, object> d)
{
Expand Down
4 changes: 2 additions & 2 deletions SharpSimpleNLG/helperextensions/HelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ the source of the call to pure-er C# to reduce call depth/stack use
Not a complete implementation of C# to Java - just for SimpleNLG
Nick Hodge [email protected]
*/
public static class HelperExtensions

internal static class HelperExtensions
{
// for chars
public static bool isDigit(this char c)
Expand Down

0 comments on commit 5f5aff1

Please sign in to comment.