SIL Language & Culture Model (LCM)
The library for the SIL Language and Culture Model.
The liblcm library is the core FieldWorks model for
linguistic analyses of languages. Tools in this library provide the ability to store and interact
with language and culture data, including anthropological, text corpus, and linguistics data.
Install Required Software
Clone the liblcm repository
git clone https://github.com/sillsdev/liblcm.git
Build liblcm
cd into the directory of the cloned liblcm repository.
On Windows:
Run the appropriate vsvars*.bat
. Alternatively, LCM.sln
can be built from within Visual Studio.
Run build.cmd
to build the liblcm library.
On Linux:
Run build.sh
to build the liblcm library.
By default, this will build liblcm in the Debug configuration.
To build with a different configuration, use:
build.(cmd|sh) (Debug|Release)
The LCModel library consumes multiple libpalaso files as NuGet packages. FieldWorks and other
projects consume LCModel as a NuGet package. Several options to debug across NuGet dependencies are
discussed on this wiki.
To publish and consume LCModel through local sources:
LOCAL_NUGET_REPO
with the path to a folder on your computer (orbuild /t:pack
will pack nuget packages and publish them to LOCAL_NUGET_REPO
Open the solution in Rider and run them all there. Right-click the solution and choose “Run Unit Tests”.
NUnit.ConsoleRunner
then run (adjust the version number 3.11.1
accordingly):
(. environ && cd artifacts/Debug/net461/ && mono --debug ~/.nuget/packages/nunit.consolerunner/3.11.1/tools/nunit3-console.exe *Tests.dll )
Open the solution in Visual Studio and run them all there. Right-click the solution and choose “Run Unit Tests”.
To run the tests for a single test dll:
liblcm
directory.Execute: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
Note: Running the tests after building the solution from inside VS resulted in a BadImageFormatException
.
Running the tests after building from the cmd prompt worked.
liblcm\artifacts\Debug\net461
directory.Execute: ..\..\..\packages\NUnit.ConsoleRunner.3.9.0\tools\nunit3-console.exe SIL.LCModel.Tests.dll
(Or specify one of the other SIL.LCModel*Tests.dll
)
nunit-agent.exe
.