문제

I am using Gate to implement natural language processing module in my project. In the next step, I want the system support multiple users. Each user has different set of domain words(I put it into gazetteers). As far as I know, gate use a lot of static resource and It is very difficult to create multiple instances of gate. Do any one have any idea to implement multi-tenancy with Gate?

Thank you so much in advance.

PS: Reasons I use gate is because it has jape rule. It would be great if you can introduce other tool, which is easier to customize and also has that kind of rule based grammar.

도움이 되었습니까?

해결책

The answer is depends on how you use gate application.In my ideas below I assume that user domain gazetteers situated situated between other PRs(ie Tokenizer,Gazetteer,JAPE rules).

a) You use gate application from Java code. If yes then you can remove/insert gazetteers in to SerialAnalyzerController according to user identifier. You can create a Map map in memory (if gazetteers are not too big) and based on current USER_ID add/remove PR from SerialAnalyzerController before execution.

b)You use gate application but do not want to have scenario 1.Then you can write a Processing Resource, which based on user identification will use gazetteer specified. Map can be created during PR initialization stage. In PR "execute" method you can get user identifier(for example from document features) and then use appropriate gazetteer.

c) try to use Conditional Corpus PR. Not sure if this is the best solution but guess it could work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top