This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.autocomple.textanalysis.matrices; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
public class DefaultCombinationMatrix implements CombinationMatrix { | |
@Override | |
public List<List<Boolean>> getMatrix(int size, int limit) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.lucene.util.automaton; | |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.lucene.util.automaton; | |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.lucene.util.automaton; | |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Frontend { | |
this: Core => | |
def config: Config | |
val log = LoggerFactory.getLogger(getClass) | |
def route(flow:Flow[HttpRequest, HttpResponse, Unit]): Route = { | |
path("dictionaries" / Segment / "suggestions"){ dictionaryId => | |
get{ | |
parameters("ngr"){ ngr => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyServiceActor extends Actor with MyService { | |
// the HttpService trait defines only one abstract member, which | |
// connects the services environment to the enclosing actor or test | |
def actorRefFactory = context | |
// this actor only runs our route, but you could add | |
// other things here, like request stream processing | |
// or timeout handling | |
def receive = runRoute(myRoute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Core { | |
implicit val system: ActorSystem = ActorSystem("Suggestion") | |
implicit val materializer: ActorFlowMaterializer = ActorFlowMaterializer() | |
implicit val ec: ExecutionContext = system.dispatcher | |
} | |
object AkkaHttpStarter extends App{ | |
val http = new VanilaHttp with Core{ | |
override def config: Config = ConfigFactory.load() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Frontend { | |
this: Core => | |
def config: Config | |
val log = LoggerFactory.getLogger(getClass) | |
def route(flow:Flow[HttpRequest, Future[HttpResponse], Unit]): Route = { | |
path("dictionaries" / Segment / "suggestions"){ dictionaryId => | |
get{ | |
parameters("ngr"){ ngr => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '4.0.0.beta1' | |
gem 'sqlite3' | |
group :assets do | |
gem 'sass-rails', '~> 4.0.0.beta1' | |
gem 'coffee-rails', '~> 4.0.0.beta1' | |
gem 'uglifier', '>= 1.0.3' |