Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorHallman committed Aug 10, 2023
1 parent d8c52ef commit 49626c2
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 30 deletions.
12 changes: 6 additions & 6 deletions LibPostalApi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.33711.374
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibPostalApi", "LinuxDockerApi\LibPostalApi.csproj", "{C78E185A-20AB-4826-A7B2-3A06B4298E65}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DE620D2C-39FE-4C68-869B-633C09412AB6}"
ProjectSection(SolutionItems) = preProject
Dockerfile = Dockerfile
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibPostalNet", "LibPostalNet\LibPostalNet.csproj", "{DAFCE0DC-A469-46EC-985F-3059C711E45B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibPostalApi", "LibPostalApi\LibPostalApi.csproj", "{7BF98BF9-C928-4C84-B762-C4F5889F0880}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C78E185A-20AB-4826-A7B2-3A06B4298E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C78E185A-20AB-4826-A7B2-3A06B4298E65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C78E185A-20AB-4826-A7B2-3A06B4298E65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C78E185A-20AB-4826-A7B2-3A06B4298E65}.Release|Any CPU.Build.0 = Release|Any CPU
{DAFCE0DC-A469-46EC-985F-3059C711E45B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAFCE0DC-A469-46EC-985F-3059C711E45B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAFCE0DC-A469-46EC-985F-3059C711E45B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAFCE0DC-A469-46EC-985F-3059C711E45B}.Release|Any CPU.Build.0 = Release|Any CPU
{7BF98BF9-C928-4C84-B762-C4F5889F0880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BF98BF9-C928-4C84-B762-C4F5889F0880}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BF98BF9-C928-4C84-B762-C4F5889F0880}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BF98BF9-C928-4C84-B762-C4F5889F0880}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<None Include="LibPostalNet.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.5" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.1" />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ public class LibPostalService : ILibPostalService
public LibPostalService(ILogger<LibPostalService> logger, IConfiguration config)
{
_logger = logger;
_libPostal = LibPostal.GetInstance(config["libpostal:datadir"]);
var dataDir = config["libpostal:datadir"];
Console.WriteLine($"DataDir: {dataDir}");
var currentDir = Directory.GetCurrentDirectory();
Console.WriteLine($"CurrentDir: {currentDir}");
dataDir = Path.Combine(Directory.GetParent(currentDir)!.FullName, dataDir!);
Console.WriteLine($"Combine: {dataDir}");

_libPostal = LibPostal.GetInstance(dataDir);
_libPostal.LoadParser();
_libPostal.LoadLanguageClassifier();
_libPostal.PrintFeatures = true;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
},
"AllowedHosts": "*",
"libpostal": {
"datadir" : "../var/libpostal/data"
"datadir" : "var/lib/libpostal"
}
}
18 changes: 0 additions & 18 deletions LinuxDockerApi/LibPostalNet.csproj

This file was deleted.

0 comments on commit 49626c2

Please sign in to comment.