Comments (5)
It seems to be a known issue with the Clang on MacOS. Using standard gcc preprocessor seems to be the easier solution. There are some discussion of how to solve the exact same issue here.
If installing/using standard gcc is not an option, please let me know. It should be posible to change the source to make sure it also compiles with Clang preprocessor.
from trmorph.
I also had issues on my mac, but I just compiled the fst file on a Linux computer and I can just use the fst file with foma on my mac. Maybe it's possible to have an "official" compiled fst file in this repository?
from trmorph.
I am writing this for future reference for people running into this issue, in case Cagri doesn't have time to fix this one. The workaround is quite simple, and only depends on Homebrew. People often use Homebrew to install foma on OS/X anyway.
The way I work around this issue is:
- Install GCC (through Homebrew i.e.
brew install gcc
). - Discover the GCC binary. It is not
/usr/bin/gcc
, which is an alias forclang
compiler on OS/X. It is often something along the lines ofgcc-4.9
(depending on the version, of course). Confirm you got the right one by issuing the commandgcc-4.9 -v
. The output should tell you the details of the compiler. Look for wordsclang
andhomebrew
to distinguish between the two, and make sure you get the one that containshomebrew
. - Modify the Makefile of the project (i.e. the file called Makefile in the TRmorph root). Find the lines that start with
CPP=gcc...
andMAKEDEP=gcc...
, and replacegcc
with the GCC binary you located in the previous step e.g.gcc-4.9
. - Make.
Hope this helps.
from trmorph.
Installing & using GCC is not an option for me. Could a solution be to replace all #'s with a reference to a new lexicon ENDLEX, and then define that lexicon as follows?
LEXICON ENDLEX # ;
That should hopefully resolve the issue, by "protecting" the hash mark using the preceding text.
from trmorph.
That pull request only solves the issue with #. Now I have a number of the following errors:
In file included from analyzer.lexc:43:
./lexicon/punctuation:8:17: error: invalid preprocessing directive
%: Punc;
^
In file included from analyzer.lexc:51:
./lexicon/emoticon:37:4: error: invalid preprocessing directive
%:-) Interjection;
^
...
The problem seems to be the sequence %:
. And in this case it is not easy to see how to change the code to make it pass the macOS C++ preprocessor, not without seriously garbling the lexc code. Suggestions welcome :-)
from trmorph.
Related Issues (17)
- verbs with -mIş are not analyzed as verbal adjective HOT 5
- make problem HOT 2
- TRmorph can't analyse the word "dairemizdeyiz"
- The most likely analysis is invalid for "Defne'm" HOT 1
- compiling with HFST tools HOT 2
- Is an Apache 2.0 License a possibility? HOT 2
- Null outputs for some forms stemmed with lemmatization turned on HOT 1
- Possbile Memory leak
- ila/ile different analyses HOT 1
- (noun)<N><la><V><cont> problem
- Parsing the analysis results
- -luk is not getting analyzed HOT 1
- Transitivity marking on verbs HOT 1
- <LN> $passive$
- comments in lexicon files
- Having problem with "yetersizliği" HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trmorph.